Skip to content

fix: grant auto_release.yml the permissions deploy.yml requires#61

Merged
aliasunder merged 1 commit into
mainfrom
claude/fix-auto-release-permissions
May 20, 2026
Merged

fix: grant auto_release.yml the permissions deploy.yml requires#61
aliasunder merged 1 commit into
mainfrom
claude/fix-auto-release-permissions

Conversation

@aliasunder
Copy link
Copy Markdown
Owner

Summary

Every manual release leaves a failed "Auto Release" run (red X on v0.15.2–v0.15.5). This completes the fix PR #53 intended.

Why PR #53 wasn't enough

PR #53 added if: github.actor != 'vault-cortex-release[bot]' to the validate job so the App-bot's tag push would skip Auto Release. But auto_release.yml calls deploy.yml (which requires id-token: write + packages: write) while only granting contents: write. GitHub rejects the workflow at file-validation time — before any job if: is evaluated — so the actor guard never runs and the workflow fails loudly instead of skipping.

Fix

Grant auto_release.yml the permissions deploy.yml needs (matching manual_release.yml):

permissions:
  contents: write
  id-token: write   # added
  packages: write   # added

Result

  • A bot-pushed tag (from manual_release) now: file validates → actor guard skips validatedeploy/release skip via needs: → run completes as a clean skip (gray), no red X.
  • A genuine non-bot tag push (local git push --tags) now actually deploys + releases as the workflow was meant to.

Note

GitHub triggers on: push tags v* regardless of actor, so a (now-benign, skipped) Auto Release run record will still appear for each manual release — there's no way to suppress the trigger itself. If you'd rather have zero Auto Release runs (e.g., you only ever release via the manual_release workflow button and never push tags locally), the alternative is to remove auto_release.yml entirely — say the word and I'll do that instead.

YAML validated.


Generated by Claude Code

Every manual release (App-bot tag push) triggered Auto Release, which
failed with "Invalid workflow file" — it calls deploy.yml (needs
id-token: write + packages: write) but only granted contents: write.
GitHub rejects the file at validation time, BEFORE the actor guard
(`if: github.actor != 'vault-cortex-release[bot]'`, PR #53) can skip
the jobs — so it failed loudly on v0.15.2–v0.15.5 instead of skipping.

Added id-token: write + packages: write so the file validates. Now a
bot-pushed tag validates, the actor guard skips validate → deploy →
release, and the run completes as a clean skip (no red X). A genuine
non-bot tag push (local `git push --tags`) now also deploys as intended.
@aliasunder aliasunder merged commit b673f45 into main May 20, 2026
5 checks passed
@aliasunder aliasunder deleted the claude/fix-auto-release-permissions branch May 20, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants