Repository navigation
Commit 5ef9b8b
ci(release): mint the publish token with workflows:write (#1787)
## What
The v1.3.3 publish failed with `403 Resource not accessible by
integration` on knope's `POST /releases`. Renovate merged a
`.github/workflows` change to `main` (PR 1785) between the release-PR
merge and the publish job. knope sends the checked-out release commit as
`target_commitish`. That commit's workflow files then differ from
`main`, and GitHub refuses to create the tag without the Workflows
permission. A manual `workflow_dispatch` on the `main` tip published
v1.3.3 with the unchanged token, which confirms the cause.
The maintainer granted the clauster-ci App "Workflows: Read and write".
This PR adds `permission-workflows: write` to the `app-token` mint in
the `release` job, moves that mint to the end of the job, and corrects
the nearby comments.
Risk: the token reaches only the verify step's `if:` and `knope
release`. knope's `release` workflow has one `Release` step and no
`Command` steps, and the job runs no `git push`. A compromised
SHA-pinned action that runs after the mint could in theory use the wider
scope to push a workflow. The token lives for one hour at most and is
revoked at job end. To shrink that window, the second commit moves the
mint and its empty-token check to just before "Create + publish the
GitHub release", after the download, attest, Sigstore and knope-install
steps. The cost: a broken secret now fails after signing instead of
before it. Nothing publishes in either case.
## Checklist
- [x] PR title follows Conventional Commits.
- [x] `no-changelog` label applied (CI only).
- [x] Tests: not applicable, workflow-only change. `uvx zizmor` reports
no findings and `actionlint` with shellcheck passes.
- [x] Docs: no user-facing behavior or config change.
- [x] `just check` and the pre-commit hooks pass locally.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Schuby <12485317+schubydoo@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 0eb47aa commit 5ef9b8b
1 file changed
Lines changed: 32 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 109 | | |
129 | 110 | | |
130 | 111 | | |
| |||
257 | 238 | | |
258 | 239 | | |
259 | 240 | | |
260 | | - | |
261 | | - | |
262 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
263 | 244 | | |
264 | 245 | | |
265 | 246 | | |
| |||
277 | 258 | | |
278 | 259 | | |
279 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
280 | 290 | | |
281 | 291 | | |
282 | 292 | | |
| |||
0 commit comments