Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,19 @@ aliases:
- &src "/tmp/src/petprep"
orbs:
docker: circleci/[email protected]
parameters:
GHA_Actor:
type: string
default: ""
GHA_Action:
type: string
default: ""
GHA_Event:
type: string
default: ""
GHA_Meta:
type: string
default: ""

jobs:
build_clean:
Expand Down Expand Up @@ -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:
Expand All @@ -444,6 +476,11 @@ workflows:
context:
- nipreps-common

github:
when: << pipeline.parameters.GHA_Action >>
jobs:
- pull_image

build_test_deploy:
jobs:
- build:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -62,3 +61,7 @@ jobs:
cache-to: type=inline
env:
TARGET_BRANCH: ${{ github.base_ref || github.ref_name }}

- uses: CircleCI-Public/[email protected]
with:
GHA_Meta: ${{ github.base_ref || github.ref_name }}
Loading