Skip to content

Commit

Permalink
ci: only set SENTRY_AUTH_TOKEN if the secrets exits to avoid build error
Browse files Browse the repository at this point in the history
  • Loading branch information
ixartz committed Mar 8, 2024
1 parent c99cdd5 commit 91ccfe0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ jobs:
cache: "npm"
- run: npm ci

- name: Set SENTRY_AUTH_TOKEN env if secret exists
run: |
if [[ -n "${{ secrets.SENTRY_AUTH_TOKEN }}" ]]; then
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> $GITHUB_ENV
fi
- name: Build Next.js for E2E tests
run: npm run build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

- if: github.event_name == 'pull_request'
name: Validate all commits from PR
Expand Down

0 comments on commit 91ccfe0

Please sign in to comment.