Skip to content

fix(ci): pass GITHUB_TOKEN to tagpr#3

Merged
ryuichi1208 merged 1 commit into
mainfrom
fix/tagpr-token
May 16, 2026
Merged

fix(ci): pass GITHUB_TOKEN to tagpr#3
ryuichi1208 merged 1 commit into
mainfrom
fix/tagpr-token

Conversation

@ryuichi1208

Copy link
Copy Markdown
Member

Summary

The first main push after merging #1 triggered the tagpr workflow,
which failed immediately with:

git [config remote.origin.url]
https://github.com/ryuichi1208/rw
GitHub token not found
Error: Process completed with exit code 1.

Songmu/tagpr reads the GitHub token from the GITHUB_TOKEN
environment variable, not from the workflow's permissions: block
(which only controls what the auto-generated token can do, not
whether it's exposed to the action). This PR plumbs the token
explicitly:

- uses: Songmu/tagpr@v1
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Test plan

  • Once merged, the next main push triggers tagpr and it
    successfully opens a release PR (instead of erroring on the
    missing token).
  • The release PR shows the next intended version (likely
    v0.0.1 since no tag exists yet) and a changelog derived
    from the commits since Initial commit.

🤖 Generated with Claude Code

The first main push after enabling tagpr failed with "GitHub token
not found". tagpr reads the token from the GITHUB_TOKEN env var,
which isn't injected just by declaring `permissions:` on the job.

Pass it explicitly via `env:` so tagpr can create release PRs and
tags. The workflow `permissions:` block above already grants the
right scopes (contents:write, pull-requests:write).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ryuichi1208 ryuichi1208 merged commit 947c1a4 into main May 16, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request May 17, 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.

1 participant