-
-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): Skip e2e metrics steps when the auth token is not available (#…
- Loading branch information
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Skip CI when the auth token is not accessible | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
skip_ci: | ||
description: "Value 'true' if the CI cannot access the SENTRY_AUTH_TOKEN, otherwise, not defined." | ||
value: ${{ jobs.auth_token_check.outputs.skip_ci }} | ||
|
||
jobs: | ||
auth_token_check: | ||
runs-on: ubuntu-latest | ||
env: | ||
sentry_auth_token: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
outputs: | ||
skip_ci: ${{ steps.set_skip_ci.outputs.skip_ci }} | ||
steps: | ||
- id: set_skip_ci | ||
if: ${{ env.sentry_auth_token == '' }} | ||
run: | | ||
echo "skip_ci=true" >> $GITHUB_OUTPUT | ||
echo "Cannot access SENTRY_AUTH_TOKEN, skipping CI." | ||
- if: ${{ env.sentry_auth_token != '' }} | ||
run: echo "SENTRY_AUTH_TOKEN is accessible, continuing the CI checks." |