Repository navigation
Conversation
The release job checked out with secrets.GH_PAT, so that its pushes could pass a master ruleset. This repository has no GH_PAT secret and no ruleset or branch protection on master. So the checkout failed on every push to master, and no release ran. Use the default GITHUB_TOKEN, which can push the version-bump commit and the tag while master is not protected. Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
The
Releaseworkflow fails on every push tomaster, so no release has run in this repository. This PR removes theGH_PATtoken from its checkout step, so that the job uses the defaultGITHUB_TOKEN.🐛 Bug Fixes
Checkout repositorystep of thereleasejob fails withInput required and not supplied: token, for example in run 39392670801 on 6817810 and in run 38862362298.🔍 Root Cause Analysis
Problem Description
The checkout step uses
token: ${{ secrets.GH_PAT }}(release.yml:35-40). This repository does not give the job aGH_PATsecret, so the input is empty and checkout stops.Because of this, the PRs merged so far did not make a release: the repository has no tags and no releases, and the version in
pyproject.tomlis still2.62.0.Why
GH_PATwas addedThis repository was moved from
tier4/autoware_lanelet2_to_opendrive. There, tier4/autoware_lanelet2_to_opendrive#478 added the token:master.masterruleset of the tier4 repository was changed. It required 4 status checks, and only organization admins could bypass it.GITHUB_TOKENacts asgithub-actions[bot], which could not bypass the ruleset. So every push was rejected withGH013(example run).GH_PAT, a personal token of an org admin that the tier4 repository already had. Its pushes could bypass the ruleset.Why we do not need it here
The workflow file moved to this repository, but the ruleset and the secret did not.
masterhas no ruleset and no branch protection.GET /repos/autowarefoundation/autoware_lanelet2_to_opendrive/branches/mastergives"protected": false, andGET /repos/autowarefoundation/autoware_lanelet2_to_opendrive/rules/branches/mastergives[]. So nothing blocks a push fromGITHUB_TOKEN, and the workflow already gives itcontents: write.GH_PATsecret. The checkout errorInput required and not supplied: tokenin the runs above shows that the value is empty. So the token is the cause of the failure, not a fix for one.Why we should not keep it
GITHUB_TOKENis made for each run, only for this repository, and expires when the job ends.If
mastergets a ruleset later, the release job needs an identity on its bypass list again. A GitHub App token is the better choice then, not a personal token.We also did not use the fallback form
token: ${{ secrets.GH_PAT || github.token }}. It would keep an unused path for a personal token, and nothing here needs one.🛠️ Changes
.github/workflows/release.ymlRemove
token: ${{ secrets.GH_PAT }}and its comment from the checkout step of thereleasejob.actions/checkoutthen usesGITHUB_TOKEN, and latergit pushandmike deploy --pushuse the same credential.One side effect: a push with
GITHUB_TOKENdoes not start other workflows. So the version-bump commit does not startci.ymlonmaster. No workflow triggers on tags.✅ Testing
SKIP=mypy pre-commit run --files .github/workflows/release.yml: all hooks passed or skipped.releasejob runs only on a push tomaster, so the first release after this PR merges is the real test.📊 Expected Results
masterwith abumplabel passes checkout, bumps the version, pushes the tag, and makes a GitHub release.mikecreates thegh-pagesbranch and pushes the docs to it.has_pages: false). So the docs are not served on a website until somebody turns Pages on.None.
📝 Related Issues
AI usage
AI usage: Written with Claude Code in Breeze from the failed
Releaseruns. Claude Code read the run log, the workflow history, and the branch protection and rulesets ofmaster, then removed the token line.Self-review: One review round by a separate AI session with a clean context, on
87ef2ed. It found no must-fix issue. It confirmed thatmasterandgh-pageshave no rules, thatcontents: writecovers every push of the job, and that no other file usesGH_PAT. From its suggestions, I made the secret claim match the evidence, added the docs and Pages lines to Expected Results, and explained why we did not use aGH_PAT || github.tokenfallback. It also noted that the workflow has noconcurrencygroup, so two merges close together can make the second bump push fail. This PR does not change that.Verification: pre-commit ran on the changed file, and all hooks passed or skipped. The PR checks passed, except
claude-review. The Release workflow did not run.SKIP=mypy pre-commit run --files .github/workflows/release.ymlcheck yaml,trim trailing whitespace,fix end of files,mixed line ending,check for added large files, andcheck for merge conflictsprintedPassed. The Python hooks printedSkipped, because no Python file changed.actionlint, because it is not installed on my machine.Releaseworkflow, because it runs only on a push tomaster.PR checks on
87ef2edlint-and-format,test (3.10, carla),docs,qc-validate,Workflow YAML Syntax Check,Check Version Bump Label,Check Links,check-src-changes, andDCO.claude-review, at theRun Claude Code Reviewstep ofclaude-code-review.yml. This PR does not change that workflow.