Skip to content

Migrate release tag/release creation to dd-octo-sts - #29

Merged
johncburns1 merged 1 commit into
mainfrom
jack.burns/dd-octo-sts-release
Jul 14, 2026
Merged

Migrate release tag/release creation to dd-octo-sts#29
johncburns1 merged 1 commit into
mainfrom
jack.burns/dd-octo-sts-release

Conversation

@johncburns1

Copy link
Copy Markdown
Collaborator

Summary

  • An org-wide GitHub tag-protection ruleset blocks github-actions[bot] from creating tag/ref objects. The SDK repo (dispatch_agents_sdk) hit this on release v0.14.7 (GH013: Cannot create ref due to creations being restricted) and fixed it by migrating to dd-octo-sts (datadog-labs/dispatch_agents_sdk#34).
  • This CLI's release job creates releases via gh release create ... --target $GITHUB_SHA using the default GITHUB_TOKEN, which is subject to the same ruleset. It hasn't failed yet only because the last release predates the ruleset's rollout — this proactively ports the fix.
  • Adds .github/chainguard/self.release.push.sts.yaml, a trust policy scoped to push events on main for this exact workflow, granting contents: write.
  • Adds id-token: write permission, a dd-octo-sts token exchange step, and a gh auth status verification step, then switches the release step to use the exchanged token instead of github.token.
  • Unlike the SDK, this workflow has no git tag/git push/actions/checkout step, so the follow-up persist-credentials: false fix from SDK PR #35 doesn't apply here.

Test plan

  • YAML validated (python3 -c "import yaml; yaml.safe_load(open('.github/workflows/release.yml'))" and same for the new trust policy)
  • After merge: the next real release push exercises the new path end-to-end — watch the Get dd-octo-sts token / Verify dd-octo-sts token / Create or update GitHub Release steps

🤖 Generated with Claude Code

An org-wide GitHub tag-protection ruleset blocks github-actions[bot] from
creating tag/ref objects, which will break this workflow's gh release create
step the same way it broke the SDK's release (v0.14.7). dd-octo-sts issues a
short-lived, narrowly-scoped installation token via OIDC that is exempt from
this restriction, per Datadog's sanctioned migration path.

Adds a trust policy scoped to push events on main for this workflow only,
and switches the release step to use the exchanged token instead of the
default GITHUB_TOKEN.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dbish
dbish self-requested a review July 14, 2026 15:14
@johncburns1
johncburns1 merged commit 17eae2d into main Jul 14, 2026
5 checks passed
@johncburns1
johncburns1 deleted the jack.burns/dd-octo-sts-release branch July 14, 2026 15:22
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