Add workflow_dispatch trigger to deploy-production
All checks were successful
CI / changes (push) Successful in 2s
CI / lint-and-test (push) Successful in 31s
CI / build (push) Has been skipped

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:
Julia McGhee
2026-03-21 16:49:47 +00:00
parent 14cf33f57f
commit b6bd2dbae0

View File

@@ -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: |
APPS=$(pnpm turbo build --filter='...[HEAD~1]' --dry-run=json | jq -r '[.packages[] | select(startswith("@homelab/")) | sub("@homelab/";"") ] | join(",")')
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