File tree Expand file tree Collapse file tree 2 files changed +30
-2
lines changed
Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 2020jobs :
2121 diff_check :
2222 uses : ./.github/workflows/skip-ci.yml
23+ auth_token_check :
24+ uses : ./.github/workflows/skip-ci-noauth.yml
25+ secrets : inherit
2326
2427 metrics :
2528 runs-on : ${{ matrix.runs-on }}
26- needs : [diff_check]
27- if : ${{ needs.diff_check.outputs.skip_ci != 'true' && env.SENTRY_AUTH_TOKEN != null }}
29+ needs : [diff_check, auth_token_check ]
30+ if : ${{ needs.diff_check.outputs.skip_ci != 'true' && needs.auth_token_check.outputs.skip_ci != 'true' }}
2831 env :
2932 SENTRY_DISABLE_AUTO_UPLOAD : ' true'
3033 strategy :
Original file line number Diff line number Diff line change 1+ name : Skip CI when the auth token is not accessible
2+
3+ on :
4+ workflow_call :
5+ outputs :
6+ skip_ci :
7+ description : " Value 'true' if the CI cannot access the SENTRY_AUTH_TOKEN, otherwise, not defined."
8+ value : ${{ jobs.auth_token_check.outputs.skip_ci }}
9+
10+ jobs :
11+ auth_token_check :
12+ runs-on : ubuntu-latest
13+ env :
14+ sentry_auth_token : ${{ secrets.SENTRY_AUTH_TOKEN }}
15+ outputs :
16+ skip_ci : ${{ steps.set_skip_ci.outputs.skip_ci }}
17+ steps :
18+ - id : set_skip_ci
19+ if : ${{ env.sentry_auth_token == '' }}
20+ run : |
21+ echo "skip_ci=true" >> $GITHUB_OUTPUT
22+ echo "Cannot access SENTRY_AUTH_TOKEN, skipping CI."
23+
24+ - if : ${{ env.sentry_auth_token != '' }}
25+ run : echo "SENTRY_AUTH_TOKEN is accessible, continuing the CI checks."
You can’t perform that action at this time.
0 commit comments