Fix CD: trigger on automerge + manual dispatch

GITHUB_TOKEN merges (from automerge action) don't trigger push
events on other workflows. Added:
- workflow_run trigger after Automerge completes
- workflow_dispatch for manual gh workflow run cd.yml

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-03-25 01:18:12 +01:00
parent 14656b6527
commit 46c880973d
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -1,8 +1,17 @@
name: CD
# Triggers:
# - push: normal merges (manual gh pr merge)
# - workflow_run: after automerge completes (GITHUB_TOKEN merges don't trigger push)
# - workflow_dispatch: manual trigger via gh workflow run cd.yml
on:
push:
branches: [main]
workflow_run:
workflows: ["Automerge"]
branches: [main]
types: [completed]
workflow_dispatch: {}
concurrency:
group: deploy
@ -12,6 +21,7 @@ jobs:
build-images:
name: Build & Push Docker Images
runs-on: ubuntu-latest
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
permissions:
contents: read
packages: write