Skip to content

Commit 477b848

Browse files
authored
ci(build): Skip snapshot upload on PRs from forks (#5622)
Fork PRs don't have access to SENTRY_AUTH_TOKEN, so the upload step would attempt to run without credentials. Guard it the same way the replay snapshot upload is guarded so fork PRs cleanly skip it.
1 parent 3c89fa4 commit 477b848

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ jobs:
4949
run: curl -sL https://sentry.io/get-cli/ | bash
5050

5151
- name: Upload Snapshots to Sentry
52+
# Skip on PRs from forks, which don't have access to the upload secret
53+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
5254
run: |
5355
sentry-cli build snapshots ./sentry-android-core/build/test-snapshots \
5456
--app-id sentry-android-core

0 commit comments

Comments
 (0)