Skip to content

Commit ce617a7

Browse files
fix(release): use built-in GITHUB_TOKEN to dispatch recompile workflow (#923)
The post-release `trigger-recompile-safe-output-fixtures` job was using `secrets.GH_AW_CI_TRIGGER_TOKEN` to authenticate `gh workflow run`. That secret is a gh-aw runtime convention scoped to agentic workflows' safe-output PR creation; `release.yml` is a plain GitHub Actions workflow and shouldn't depend on it. When the secret is not provisioned (as on this repo today), the dispatch step fails with `GH_TOKEN` unset and the recompile never runs (see run 27193012425). Switch the dispatch to the built-in `secrets.GITHUB_TOKEN` with an explicit `permissions: actions: write` scope. The dispatched recompile workflow continues to use its own secrets for any downstream PR creation, so no behavior is lost. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9cf5f63 commit ce617a7

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,20 +191,23 @@ jobs:
191191
name: Trigger safe-output fixture recompile
192192
needs: [release-please, checksums]
193193
# Run only once all release assets (binaries + checksums.txt) are uploaded.
194-
# Releases published via release-please use the default GITHUB_TOKEN, which
195-
# does NOT fire the `release: published` event on other workflows (GitHub
196-
# actively suppresses this to prevent recursive triggers). Dispatch the
197-
# recompile workflow explicitly here using a PAT so the dispatched run can
198-
# itself open a PR.
194+
# Releases published via release-please do NOT fire the `release: published`
195+
# event on other workflows (GitHub suppresses this to prevent recursive
196+
# triggers), so we explicitly dispatch the recompile workflow here. The
197+
# default GITHUB_TOKEN has the `actions:write` scope needed to run
198+
# `gh workflow run`; the dispatched workflow uses its own secrets for any
199+
# downstream PR creation.
199200
if: >-
200201
always() &&
201202
(needs.release-please.outputs.release_created == 'true' || github.event_name == 'workflow_dispatch') &&
202203
needs.checksums.result == 'success'
203204
runs-on: ubuntu-22.04
205+
permissions:
206+
actions: write
204207
steps:
205208
- name: Dispatch recompile-safe-output-fixtures
206209
env:
207-
GITHUB_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }}
210+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
208211
run: |
209212
set -euo pipefail
210213
TAG="${{ needs.release-please.outputs.tag_name || github.event.inputs.tag_name }}"

0 commit comments

Comments
 (0)