Add workflow_dispatch trigger to deploy-production
Allows manual trigger to build all apps (or specific ones). Empty input builds web, api, harness. Useful for initial registry population after migration.
This commit is contained in:
@@ -3,6 +3,12 @@ name: Deploy Production
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
apps:
|
||||
description: "Comma-separated app names to build (leave empty for all)"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
@@ -19,7 +25,16 @@ jobs:
|
||||
- name: Determine changed apps
|
||||
id: changes
|
||||
run: |
|
||||
if [ "${{ gitea.event_name }}" = "workflow_dispatch" ]; then
|
||||
INPUT="${{ gitea.event.inputs.apps }}"
|
||||
if [ -z "$INPUT" ]; then
|
||||
APPS="web,api,harness"
|
||||
else
|
||||
APPS="$INPUT"
|
||||
fi
|
||||
else
|
||||
APPS=$(pnpm turbo build --filter='...[HEAD~1]' --dry-run=json | jq -r '[.packages[] | select(startswith("@homelab/")) | sub("@homelab/";"") ] | join(",")')
|
||||
fi
|
||||
echo "apps=$APPS" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build and push images
|
||||
|
||||
Reference in New Issue
Block a user