Skip to content

Commit 317b43b

Browse files
committed
configured secret to be saved in env var rather than output
1 parent ece3257 commit 317b43b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/ci-cd.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ jobs:
125125
- ants
126126
- fsl
127127
- freesurfer
128+
env:
129+
SECRET: ""
128130
steps:
129131
- name: Get secret for corresponding repo
130132
id: get_secret
@@ -138,13 +140,13 @@ jobs:
138140
elif [ "${{ matrix.repo }}" == "freesurfer" ]; then
139141
SECRET="${{ secrets.FREESURFER_PAT }}"
140142
fi
141-
echo "SECRET=$SECRET" >> $GITHUB_OUTPUT
143+
echo "SECRET=$SECRET" >> $GITHUB_ENV
142144
143145
- name: Trigger post-release on downstream repos
144-
if: github.event_name == 'release' && steps.get_secret.outputs.SECRET
146+
if: github.event_name == 'release' && env.SECRET
145147
run: |
146-
curl -XPOST -u "${{ steps.get_secret.outputs.SECRET }}" -H "Accept: application/vnd.github.everest-preview+json" \
148+
curl -XPOST -u "${{ env.SECRET }}" -H "Accept: application/vnd.github.everest-preview+json" \
147149
"https://api.github.com/repos/nipype/pydra-${{ matrix.repo }}/dispatches" \
148150
-d '{"event_type": "create-post-release"}'
149151
env:
150-
PAT: ${{ steps.get_secret.outputs.SECRET }}
152+
PAT: ${{ env.SECRET }}

0 commit comments

Comments
 (0)