From 6fa46e692aa7a838d7ea4e8cd48d86fbace36cc9 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 8 Sep 2025 21:18:46 -0400 Subject: [PATCH 1/3] chore(ci): Add triggerable workflow to CircleCI --- .circleci/config.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7b94cfa9..3365a9e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,6 +92,19 @@ aliases: - &src "/tmp/src/petprep" orbs: docker: circleci/docker@2.1.4 +parameters: + GHA_Actor: + type: string + default: "" + GHA_Action: + type: string + default: "" + GHA_Event: + type: string + default: "" + GHA_Meta: + type: string + default: "" jobs: build_clean: @@ -428,6 +441,25 @@ jobs: steps: - run: echo Deploying! + pull_image: + <<: *machine_defaults + environment: + GHA_Actor: << pipeline.parameters.GHA_Actor >> + GHA_Event: << pipeline.parameters.GHA_Event >> + GHA_Action: << pipeline.parameters.GHA_Action >> + GHA_Meta: << pipeline.parameters.GHA_Meta >> + REVISION: << pipeline.git.revision >> + steps: + - checkout + - run: + name: Print parameters + command: | + echo $GHA_Actor + echo $GHA_Event + echo $GHA_Action + echo $GHA_Meta + echo $REVISION + workflows: version: 2 build_from_scratch: @@ -444,6 +476,11 @@ workflows: context: - nipreps-common + github: + when: << pipeline.parameters.GHA_Action >> + jobs: + - pull_image + build_test_deploy: jobs: - build: From e81f0e349e238f80c376667801d222f5193ef131 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 8 Sep 2025 21:19:02 -0400 Subject: [PATCH 2/3] chore(ci): Push to ghcr unconditionally --- .github/workflows/docker.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index bd881aef..fbf83f74 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -34,7 +34,6 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log into registry ${{ env.REGISTRY }} - if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} @@ -51,7 +50,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - push: ${{ github.event_name != 'pull_request' }} + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64 From 008d9792c85e203bab7d51244eee48782a91c980 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 8 Sep 2025 21:20:04 -0400 Subject: [PATCH 3/3] chore(ci): Trigger CircleCI --- .github/workflows/docker.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index fbf83f74..d52737fb 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -61,3 +61,7 @@ jobs: cache-to: type=inline env: TARGET_BRANCH: ${{ github.base_ref || github.ref_name }} + + - uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.2.0 + with: + GHA_Meta: ${{ github.base_ref || github.ref_name }}