Commit 6155b7a
authored
fix(workflow): use app token for gh variable set — GITHUB_TOKEN lacks permission (#7771)
## Summary
Fix `ci-poller.yml` failing with `HTTP 403: Resource not accessible by
integration` when calling `gh variable set CI_POLLER_HAS_PENDING`.
Failing run:
https://github.com/getsentry/publish/actions/runs/24263308562/job/70852292016
## Root Cause
`GITHUB_TOKEN` cannot write repo variables through the Actions Variables
API, even with `actions: write` in the workflow permissions block. The
sentry-internal-app token has admin access and can write variables.
PR #7768 incorrectly assumed the opposite (that the app token lacked
permission and `GITHUB_TOKEN` had it).
## Changes
- `ci-poller.yml`: "Disable poller" step uses app token instead of
`GITHUB_TOKEN`
- `ci-pending.yml`: "Enable cron poller" step uses app token instead of
`GITHUB_TOKEN`
- Remove unnecessary `actions: write` from both workflow permission
blocks1 parent 526f721 commit 6155b7a
2 files changed
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
143 | | - | |
144 | | - | |
145 | | - | |
| 142 | + | |
146 | 143 | | |
147 | 144 | | |
148 | 145 | | |
149 | 146 | | |
150 | 147 | | |
151 | 148 | | |
152 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
| |||
0 commit comments