From 04f5642719e68e47d96fea711f06ffb3a1a6a641 Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Wed, 7 Oct 2026 10:00:07 +0200 Subject: [PATCH 1/3] ci: Skip snapshot upload when SENTRY_AUTH_TOKEN is unavailable --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ad7733143..9ae6a4ba9e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,9 +49,12 @@ jobs: uses: getsentry/action-setup-cli@70d7e587b84c2e78cf4d37cd33d7b74fb3729c1b # v1 - name: Upload Snapshots to Sentry - # Skip on PRs from forks, which don't have access to the upload secret - if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} run: | + # PRs from forks and Dependabot PRs have no access to the upload secret + if [ -z "$SENTRY_AUTH_TOKEN" ]; then + echo "SENTRY_AUTH_TOKEN is not available, skipping snapshot upload" + exit 0 + fi sentry-cli snapshots upload ./sentry-android-core/build/test-snapshots \ --app-id sentry-android-core env: From 25f003a623cf8ada9d54c51086b38a1439bd6a2a Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Wed, 7 Oct 2026 10:06:00 +0200 Subject: [PATCH 2/3] ci: Extend the existing if condition instead of guarding in the run script --- .github/workflows/build.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ae6a4ba9e..2eb7139dd2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,12 +49,9 @@ jobs: uses: getsentry/action-setup-cli@70d7e587b84c2e78cf4d37cd33d7b74fb3729c1b # v1 - name: Upload Snapshots to Sentry + # Skip on PRs from forks and from Dependabot, which don't have access to the upload secret + if: ${{ github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') }} run: | - # PRs from forks and Dependabot PRs have no access to the upload secret - if [ -z "$SENTRY_AUTH_TOKEN" ]; then - echo "SENTRY_AUTH_TOKEN is not available, skipping snapshot upload" - exit 0 - fi sentry-cli snapshots upload ./sentry-android-core/build/test-snapshots \ --app-id sentry-android-core env: From 9371efb5a35c80571a3dc7afcc22cfe07b8df58c Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Wed, 7 Oct 2026 10:08:35 +0200 Subject: [PATCH 3/3] ci: Revert to guarding the snapshot upload on an empty auth token --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2eb7139dd2..9ae6a4ba9e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,9 +49,12 @@ jobs: uses: getsentry/action-setup-cli@70d7e587b84c2e78cf4d37cd33d7b74fb3729c1b # v1 - name: Upload Snapshots to Sentry - # Skip on PRs from forks and from Dependabot, which don't have access to the upload secret - if: ${{ github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') }} run: | + # PRs from forks and Dependabot PRs have no access to the upload secret + if [ -z "$SENTRY_AUTH_TOKEN" ]; then + echo "SENTRY_AUTH_TOKEN is not available, skipping snapshot upload" + exit 0 + fi sentry-cli snapshots upload ./sentry-android-core/build/test-snapshots \ --app-id sentry-android-core env: