Skip to content

fix: migrate Docker build workflow to octo-sts and push trigger#514

Closed
michael-richey wants to merge 1 commit intofix/release-workflow-oidcfrom
fix/docker-workflow-octo-sts
Closed

fix: migrate Docker build workflow to octo-sts and push trigger#514
michael-richey wants to merge 1 commit intofix/release-workflow-oidcfrom
fix/docker-workflow-octo-sts

Conversation

@michael-richey
Copy link
Copy Markdown
Collaborator

Summary

Stacked on #513. Migrates build_publish_docker.yml to use octo-sts for container registry authentication and aligns it with the push: branches: [main] trigger pattern from PR #513.

  • Switches trigger from pull_request: types: [closed] to push: branches: [main]
  • Adds Detect release step (same pattern as fix: switch release workflow trigger to push to fix octo-sts OIDC mismatch #513) to skip Docker builds on non-release pushes
  • Replaces secrets.GITHUB_TOKEN with scoped octo-sts token (self.release.publish-docker policy) for docker/login-action
  • Changes username from github.actor to x-access-token (correct for GitHub App installation tokens with ghcr.io)
  • actions/attest-build-provenance is unchanged — it uses its own OIDC flow

Prerequisites

Before merging this PR, a new octo-sts policy must be created in the octo-sts config repo:

  • Policy name: self.release.publish-docker
  • Allow subject: repo:DataDog/datadog-sync-cli:ref:refs/heads/main
  • Grant: packages: write on DataDog/datadog-sync-cli

Test plan

🤖 Generated with Claude Code

Switches build_publish_docker.yml from pull_request: closed to
push: branches: [main] for consistency with the release workflow, and
replaces secrets.GITHUB_TOKEN with an octo-sts-issued token for
container registry authentication.

Requires a new self.release.publish-docker policy granting packages:write
to be created in the octo-sts config repo before merging.

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.

1 participant