Skip to content

fix: make release checkout independent of PAT - #10

Merged
lifeiscontent merged 2 commits into
mainfrom
codex/fix-release-checkout
May 6, 2026
Merged

lifeiscontent merged 2 commits into
mainfrom
codex/fix-release-checkout

Conversation

@lifeiscontent

@lifeiscontent lifeiscontent commented May 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • validate that RELEASE_TOKEN is configured before the release job attempts checkout
  • pass RELEASE_TOKEN to actions/checkout so checkout persists credentials for later git commands
  • use a plain git push instead of embedding tokens in the remote URL

Rationale

  • actions/checkout documents token persistence as the supported path for authenticated git commands after checkout
  • GITHUB_TOKEN pushes do not trigger normal follow-up push workflows, so the release tag push must use RELEASE_TOKEN or another non-GITHUB_TOKEN credential

Validation

  • git diff --check
  • parsed .github/workflows/ci.yml with Ruby YAML

Copilot AI review requested due to automatic review settings May 6, 2026 09:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the git-ops-release workflow so the repository checkout no longer depends on a PAT (RELEASE_TOKEN), and instead uses the default GitHub-provided credentials for checkout while reserving RELEASE_TOKEN (with a GITHUB_TOKEN fallback) for the release push operation.

Changes:

  • Remove PAT usage from the actions/checkout step and disable persisted credentials.
  • Update the push step to select RELEASE_TOKEN when present, otherwise fall back to GITHUB_TOKEN, and emit a warning when the PAT is missing.
  • Push via an authenticated HTTPS URL using the selected token.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml Outdated
echo "::warning::RELEASE_TOKEN is not set; using GITHUB_TOKEN for release push"
fi

git push "https://x-access-token:${token}@github.com/${GITHUB_REPOSITORY}.git" main --follow-tags
@lifeiscontent
lifeiscontent merged commit d8303ae into main May 6, 2026
6 checks passed
@lifeiscontent
lifeiscontent deleted the codex/fix-release-checkout branch May 6, 2026 09:53
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