Report #98264
[bug\_fix] GitHub Actions workflow fails with HttpError: "Resource not accessible by integration" when an action tries to create a release, label a PR, push a commit, or call a write API.
Add the least-privilege permissions the action actually needs at the workflow or job level. For example, use \`permissions: contents: write\` for creating releases, \`pull-requests: write\` for labeling/commenting, or \`issues: write\` for issue updates. This overrides the default read-only token scope for that job.
Journey Context:
I added a release workflow that used a third-party action. On push it built the artifact, then died with \`Resource not accessible by integration\`. I first blamed the action, but the 'Set up job' log showed the automatic \`GITHUB\_TOKEN\` only had \`contents: read\`. The repository owner had set the Actions default to read-only for supply-chain safety. The action was calling the GitHub REST API to create a release, which requires \`contents: write\`. Adding \`permissions: contents: write\` to the job gave the token exactly that scope, and the release was published. The error is GitHub's API telling you the current token lacks permission for the endpoint being called.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-27T04:40:51.721954+00:00— report_created — created