Skip to content

fix: use base.ref instead of head_ref for checkout in tagpr-release.yml#76

Merged
kryota-dev merged 1 commit intomainfrom
claude/71/fix-tagpr-checkout-ref
Mar 28, 2026
Merged

fix: use base.ref instead of head_ref for checkout in tagpr-release.yml#76
kryota-dev merged 1 commit intomainfrom
claude/71/fix-tagpr-checkout-ref

Conversation

@kryota-dev
Copy link
Copy Markdown
Owner

Summary

Fix incorrect checkout ref in tagpr-release.yml. The previous fix (#73) used github.head_ref which checks out the PR head branch (e.g., tagpr-from-v0.1.1), but tagpr requires being on the release branch (main).

Changes

  • Replace github.head_ref with github.event.pull_request.base.ref in the checkout step
    • pull_request event: base.ref = main (PR base branch) → correct
    • push event: base.ref = empty → default checkout behavior → correct
  • Update documentation (EN/JA)

Related Issues

closes #71

Checklist

  • All uses: references are pinned to full commit SHAs (40 characters) with the tag noted in a comment
  • File naming conventions (kebab-case) are followed
  • Required permissions are set to the minimum necessary
  • Ran actionlint locally and confirmed no errors

`github.head_ref` checks out the PR head branch (e.g., tagpr-from-v0.1.1),
but tagpr requires being on the release branch (main). Use
`github.event.pull_request.base.ref` instead, which resolves to the PR
base branch (main) for pull_request events and empty for push events.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kryota-dev kryota-dev self-assigned this Mar 28, 2026
@kryota-dev kryota-dev merged commit 4254803 into main Mar 28, 2026
5 checks passed
@kryota-dev kryota-dev deleted the claude/71/fix-tagpr-checkout-ref branch March 28, 2026 18:18
@kryota-dev kryota-dev mentioned this pull request Mar 28, 2026
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.

my-update-release-pr.yml fails due to detached HEAD when tagpr:minor/major label is applied

1 participant