Skip to content

Commit a3d95b1

Browse files
nedtwiggclaude
andcommitted
Pass -R to gh in the release security-audit job (no checkout present)
The dispatch job has no actions/checkout step, so gh could not infer the repo from a git remote and failed with "not a git repository". Pass -R "$GITHUB_REPOSITORY" to gh workflow run / run list / run watch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3887e0e commit a3d95b1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,21 @@ jobs:
260260
# pre-existing workflow_dispatch run on the same commit.
261261
since="$(date -u -d '-30 seconds' +%Y-%m-%dT%H:%M:%SZ)"
262262
263+
# This job has no checkout, so every gh call needs an explicit
264+
# -R; otherwise gh tries to infer the repo from git and fails
265+
# with "not a git repository".
266+
repo="$GITHUB_REPOSITORY"
267+
263268
echo "Dispatching $workflow on $tag ($sha)…"
264-
gh workflow run "$workflow" --ref "$tag"
269+
gh workflow run "$workflow" -R "$repo" --ref "$tag"
265270
266271
# The dispatched run takes a few seconds to register. Poll for it:
267272
# same head commit, workflow_dispatch event, created after $since.
268273
run_id=""
269274
for attempt in $(seq 1 36); do
270275
sleep 5
271276
run_id="$(gh run list \
277+
-R "$repo" \
272278
--workflow "$workflow" \
273279
--event workflow_dispatch \
274280
--limit 20 \
@@ -286,7 +292,7 @@ jobs:
286292
echo "Watching security-audit run $run_id …"
287293
# --exit-status fails this job if the audit run failed, which
288294
# blocks publish-vscode (needs: security-audit).
289-
gh run watch "$run_id" --exit-status
295+
gh run watch "$run_id" -R "$repo" --exit-status
290296
291297
publish-vscode:
292298
name: Publish VSCode Extension

0 commit comments

Comments
 (0)