Skip to content

Commit ece3257

Browse files
committed
added post release trigger jobs
1 parent 39674f7 commit ece3257

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/ci-cd.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,38 @@ jobs:
113113
with:
114114
user: __token__
115115
password: ${{ secrets.PYPI_API_TOKEN }}
116+
117+
118+
trigger_post_release:
119+
needs: [deploy]
120+
runs-on: ubuntu-latest
121+
strategy:
122+
matrix:
123+
repo:
124+
- afni
125+
- ants
126+
- fsl
127+
- freesurfer
128+
steps:
129+
- name: Get secret for corresponding repo
130+
id: get_secret
131+
run: |
132+
if [ "${{ matrix.repo }}" == "afni" ]; then
133+
SECRET="${{ secrets.AFNI_PAT }}"
134+
elif [ "${{ matrix.repo }}" == "ants" ]; then
135+
SECRET="${{ secrets.ANTS_PAT }}"
136+
elif [ "${{ matrix.repo }}" == "fsl" ]; then
137+
SECRET="${{ secrets.FSL_PAT }}"
138+
elif [ "${{ matrix.repo }}" == "freesurfer" ]; then
139+
SECRET="${{ secrets.FREESURFER_PAT }}"
140+
fi
141+
echo "SECRET=$SECRET" >> $GITHUB_OUTPUT
142+
143+
- name: Trigger post-release on downstream repos
144+
if: github.event_name == 'release' && steps.get_secret.outputs.SECRET
145+
run: |
146+
curl -XPOST -u "${{ steps.get_secret.outputs.SECRET }}" -H "Accept: application/vnd.github.everest-preview+json" \
147+
"https://api.github.com/repos/nipype/pydra-${{ matrix.repo }}/dispatches" \
148+
-d '{"event_type": "create-post-release"}'
149+
env:
150+
PAT: ${{ steps.get_secret.outputs.SECRET }}

0 commit comments

Comments
 (0)