4141
4242 name : e2e tests
4343 runs-on : ubuntu-latest
44+ permissions :
45+ contents : read
46+ issues : write
47+ pull-requests : read
4448 strategy :
4549 fail-fast : false
4650 matrix :
@@ -125,6 +129,7 @@ jobs:
125129 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
126130 with :
127131 ref : ${{ inputs.target_ref || github.event.pull_request.head.sha || github.sha }}
132+ persist-credentials : false
128133
129134 - name : Check user permissions on PRs
130135 if : github.event_name == 'pull_request_target'
@@ -164,7 +169,7 @@ jobs:
164169 repo : chmouel/snazy
165170
166171 - name : Install minica
167- run : |
172+ run : | # zizmor: ignore[github-env]
168173 go install github.com/jsha/minica@latest
169174 echo "${HOME}/go/bin" >> "$GITHUB_PATH"
170175
@@ -173,10 +178,13 @@ jobs:
173178 with :
174179 repository : openshift-pipelines/startpaac
175180 path : startpaac
181+ persist-credentials : false
176182
177183 - name : Run gosmee for main controller
184+ env :
185+ PYSMEE_URL : ${{ secrets.PYSMEE_URL }}
178186 run : |
179- nohup gosmee client --saveDir /tmp/gosmee-replay ${{ secrets. PYSMEE_URL }} "https://${CONTROLLER_DOMAIN_URL}" > /tmp/gosmee-main.log 2>&1 &
187+ nohup gosmee client --saveDir /tmp/gosmee-replay "${ PYSMEE_URL}" "https://${CONTROLLER_DOMAIN_URL}" > /tmp/gosmee-main.log 2>&1 &
180188
181189 - name : Generate unique gosmee URL for Gitea tests
182190 if : startsWith(matrix.provider, 'gitea') || matrix.provider == 'concurrency'
@@ -185,10 +193,11 @@ jobs:
185193 SMEE_URL=$(curl -s https://hook.pipelinesascode.com -o /dev/null -w '%{redirect_url}')
186194 echo "Generated unique smee URL: ${SMEE_URL}"
187195 echo "url=${SMEE_URL}" >> "$GITHUB_OUTPUT"
188- echo "TEST_GITEA_SMEEURL=${SMEE_URL}" >> "$GITHUB_ENV"
189196
190197 - name : Run gosmee for main controller (Gitea)
191198 if : startsWith(matrix.provider, 'gitea') || matrix.provider == 'concurrency'
199+ env :
200+ TEST_GITEA_SMEEURL : ${{ steps.gosmee-url.outputs.url }}
192201 run : |
193202 nohup gosmee client --saveDir /tmp/gosmee-replay "${TEST_GITEA_SMEEURL}" "https://${CONTROLLER_DOMAIN_URL}" >> /tmp/gosmee-main.log 2>&1 &
194203
@@ -199,10 +208,11 @@ jobs:
199208 SMEE_URL=$(curl -s https://hook.pipelinesascode.com -o /dev/null -w '%{redirect_url}')
200209 echo "Generated unique GitLab smee URL: ${SMEE_URL}"
201210 echo "url=${SMEE_URL}" >> "$GITHUB_OUTPUT"
202- echo "TEST_GITLAB_SMEEURL=${SMEE_URL}" >> "$GITHUB_ENV"
203211
204212 - name : Run gosmee for GitLab tests
205213 if : matrix.provider == 'gitlab_bitbucket'
214+ env :
215+ TEST_GITLAB_SMEEURL : ${{ steps.gosmee-gitlab-url.outputs.url }}
206216 run : |
207217 nohup gosmee client --saveDir /tmp/gosmee-replay-gitlab "${TEST_GITLAB_SMEEURL}" "https://${CONTROLLER_DOMAIN_URL}" >> /tmp/gosmee-gitlab.log 2>&1 &
208218
@@ -218,10 +228,11 @@ jobs:
218228 SMEE_URL=$(curl -s https://hook.pipelinesascode.com -o /dev/null -w '%{redirect_url}')
219229 echo "Generated unique GHE webhook smee URL: ${SMEE_URL}"
220230 echo "url=${SMEE_URL}" >> "$GITHUB_OUTPUT"
221- echo "TEST_GITHUB_SECOND_WEBHOOK_SMEE_URL=${SMEE_URL}" >> "$GITHUB_ENV"
222231
223232 - name : Run gosmee for second controller GHE webhook
224233 if : startsWith(matrix.provider, 'github_ghe') || matrix.provider == 'concurrency'
234+ env :
235+ TEST_GITHUB_SECOND_WEBHOOK_SMEE_URL : ${{ steps.gosmee-ghe-webhook-url.outputs.url }}
225236 run : |
226237 nohup gosmee client --saveDir /tmp/gosmee-replay-ghe-webhook "${TEST_GITHUB_SECOND_WEBHOOK_SMEE_URL}" "https://ghe.paac-127-0-0-1.nip.io" >> /tmp/gosmee-ghe-webhook.log 2>&1 &
227238
@@ -267,7 +278,7 @@ jobs:
267278 TEST_GITLAB_API_URL : https://gitlab.com
268279 TEST_GITLAB_GROUP : pac-e2e-tests
269280 TEST_GITLAB_SECOND_GROUP : ${{ vars.TEST_GITLAB_SECOND_GROUP }}
270- TEST_GITLAB_SMEEURL : ${{ env.TEST_GITLAB_SMEEURL }}
281+ TEST_GITLAB_SMEEURL : ${{ steps.gosmee-gitlab-url.outputs.url }}
271282 TEST_GITLAB_TOKEN : ${{ secrets.GITLAB_TOKEN }}
272283 TEST_GITLAB_SECOND_TOKEN : ${{ secrets.TEST_GITLAB_SECOND_TOKEN }}
273284
@@ -298,16 +309,18 @@ jobs:
298309 - name : Start installing cluster with startpaac
299310 env :
300311 PAC_DIR : ${{ github.workspace }}
312+ VARS_APPLICATION_ID : ${{ vars.APPLICATION_ID }}
313+ VARS_TEST_GITHUB_SECOND_APPLICATION_ID : ${{ vars.TEST_GITHUB_SECOND_APPLICATION_ID }}
301314 run : |
302315 mkdir -p ~/secrets
303- echo "${{ vars.APPLICATION_ID } }" > ~/secrets/github-application-id
316+ echo "${VARS_APPLICATION_ID }" > ~/secrets/github-application-id
304317 echo "${{ secrets.APP_PRIVATE_KEY }}" > ~/secrets/github-private-key
305318 echo "${{ secrets.WEBHOOK_SECRET }}" > ~/secrets/webhook.secret
306319 echo "${{ secrets.PYSMEE_URL }}" > ~/secrets/smee
307320
308321
309322 mkdir -p ~/secrets-second
310- echo "${{ vars.TEST_GITHUB_SECOND_APPLICATION_ID } }" > ~/secrets-second/github-application-id
323+ echo "${VARS_TEST_GITHUB_SECOND_APPLICATION_ID }" > ~/secrets-second/github-application-id
311324 echo "${{ secrets.TEST_GITHUB_SECOND_PRIVATE_KEY }}" > ~/secrets-second/github-private-key
312325 echo "${{ secrets.TEST_GITHUB_SECOND_WEBHOOK_SECRET }}" > ~/secrets-second/webhook.secret
313326 echo "${{ secrets.TEST_GITHUB_SECOND_SMEE_URL }}" > ~/secrets-second/smee
@@ -393,10 +406,15 @@ jobs:
393406 notify-slack :
394407 name : Notify Slack on Failures
395408 runs-on : ubuntu-latest
409+ permissions :
410+ contents : read
411+ actions : read
396412 needs : [e2e-tests]
397413 if : ${{ always() && github.ref_name == 'main' && github.event_name == 'schedule' }}
398414 steps :
399415 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
416+ with :
417+ persist-credentials : false
400418 - name : Download all artifacts
401419 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
402420 with :
0 commit comments