Skip to content

Commit 2c032cb

Browse files
fabriciojsclaude
andcommitted
feat(ci): add downstream repository triggers (US-005)
Add trigger-downstream job that: - Runs only on master branch and kool-dev/docker-php repo - Waits for all push jobs to complete (nginx + node) - Triggers 4 downstream repositories via repository-dispatch: - kool-dev/docker-wordpress - kool-dev/docker-php-sqlsrv - kool-dev/docker-php-swoole - kool-dev/docker-phpqa Uses peter-evans/repository-dispatch@v3 with DISPATCH_TOKEN secret. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 871dbf6 commit 2c032cb

File tree

2 files changed

+37
-7
lines changed

2 files changed

+37
-7
lines changed

.github/workflows/ci-cd.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,3 +541,33 @@ jobs:
541541
push: true
542542
platforms: linux/amd64,linux/arm64
543543
tags: kooldev/php:8.4-debian-nginx${{ matrix.type }}
544+
545+
# ===========================================
546+
# DOWNSTREAM TRIGGERS (master branch only)
547+
# ===========================================
548+
# These jobs trigger builds in dependent repositories after all
549+
# images have been successfully pushed to Docker Hub.
550+
551+
trigger-downstream:
552+
needs:
553+
- push-alpine-nginx
554+
- push-alpine-node
555+
- push-debian-nginx
556+
if: github.ref == 'refs/heads/master' && github.repository == 'kool-dev/docker-php'
557+
runs-on: ubuntu-latest
558+
559+
strategy:
560+
matrix:
561+
repo:
562+
- kool-dev/docker-wordpress
563+
- kool-dev/docker-php-sqlsrv
564+
- kool-dev/docker-php-swoole
565+
- kool-dev/docker-phpqa
566+
567+
steps:
568+
- name: Trigger ${{ matrix.repo }}
569+
uses: peter-evans/repository-dispatch@v3
570+
with:
571+
token: ${{ secrets.DISPATCH_TOKEN }}
572+
repository: ${{ matrix.repo }}
573+
event-type: docker-php-updated

tasks/prd-ci-cd-refactor.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ The core problem: multi-arch builds require the `docker-container` buildx driver
6161
- [x] Debian-specific tests preserved (gosu, bash)
6262
- [x] Supervisord test uses correct flag: `supervisord --version` (not `supervisord version`)
6363

64-
### US-005: Downstream triggers
64+
### US-005: Downstream triggers ✅ COMPLETED
6565
**Description:** As a maintainer, I want downstream repositories to be triggered after all images are successfully pushed.
6666

6767
**Acceptance Criteria:**
68-
- [ ] Triggers only run on master branch and correct repository
69-
- [ ] Triggers wait for ALL push jobs to complete
70-
- [ ] Trigger: kool-dev/docker-wordpress
71-
- [ ] Trigger: kool-dev/docker-php-sqlsrv
72-
- [ ] Trigger: kool-dev/docker-php-swoole
73-
- [ ] Trigger: kool-dev/docker-phpqa
68+
- [x] Triggers only run on master branch and correct repository
69+
- [x] Triggers wait for ALL push jobs to complete
70+
- [x] Trigger: kool-dev/docker-wordpress
71+
- [x] Trigger: kool-dev/docker-php-sqlsrv
72+
- [x] Trigger: kool-dev/docker-php-swoole
73+
- [x] Trigger: kool-dev/docker-phpqa
7474

7575
## Functional Requirements
7676

0 commit comments

Comments
 (0)