Skip to content

fix: use dd-octo-sts token for tag creation in release workflow#511

Open
michael-richey wants to merge 3 commits intomainfrom
fix/release-workflow-octo-sts
Open

fix: use dd-octo-sts token for tag creation in release workflow#511
michael-richey wants to merge 3 commits intomainfrom
fix/release-workflow-octo-sts

Conversation

@michael-richey
Copy link
Copy Markdown
Collaborator

Summary

  • The release workflow was failing with 422 "Reference update failed" when trying to create git tags
  • Root cause: the org-level "Global Tag Protection (public repos)" ruleset blocks GITHUB_TOKEN (github-actions[bot]) from creating tags
  • Fix: switch create_release job to use dd-octo-sts (same pattern as prepare_release.yml), which issues a token with tag bypass rights
  • Adds a new STS policy file .github/chainguard/self.release.create-release.sts.yaml

Test plan

  • Merge a release PR and verify the Create release job succeeds and creates the tag + GitHub release

🤖 Generated with Claude Code

The GITHUB_TOKEN is blocked by the org-level "Global Tag Protection
(public repos)" ruleset. Switch to dd-octo-sts so the workflow runs
with a token that has tag bypass rights.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- OIDC subject for pull_request[closed] event uses base branch ref, not
  pull_request literal — align with prepare_release policy pattern
- Add explicit contents: write to build_artifacts job so artifact
  uploads still work after removing top-level permissions block

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
heyronhay
heyronhay previously approved these changes Apr 6, 2026
- Add ref: refs/heads/main constraint to claim_pattern for
  defense-in-depth (consistent with prepare_release policy)
- Add comment explaining OIDC subject derivation for pull_request events
- Quote $RELEASE_BRANCH in shell to prevent word splitting

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants