mathieudutour / mathieudutour/github-tag-action
Error: Resource not accessible by integration when tagging old commit
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 733
- Forks
- 227
- PR merge metrics
- No merged PRs in 30d
Description
I have an action which is triggered through the GitHub UI, which takes a commit_id as a parameter.
If I specify the latest commit in the repo, the action runs fine.
However, if I specify the commit before (or any previous commit) the tag step fails with an error "Resource not accessible by integration". I understand this is normally a permission problem, but my workflow has full write permissions (and also, what is the different with older commits?).
The behaviour is the same for both lightweight and annotated tags.
on:
workflow_dispatch:
inputs:
commit_id:
description: The id of the commit to create a release from
required: true
custom_version:
description: The version number tag. Omit to bump from the previous version.
name: Create Release
permissions: write-all
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ github.event.inputs.custom_version }}
commit_sha: ${{ github.event.inputs.commit_id }}
create_annotated_tag: true
Output from the action is as follows.
Run mathieudutour/github-tag-action@v6.0
with:
github_token: ***
commit_sha: f52348cda805f90c7baa6ae6c25ffd641f7a88bb
create_annotated_tag: true
default_bump: patch
default_prerelease_bump: prerelease
tag_prefix: v
release_branches: master,main
fetch_all_tags: false
dry_run: false
Previous tag was v0.1.1, previous version was 0.1.1.
Analysis of 0 commits complete: no release
New version is 0.1.2.
New tag after applying prefix is v0.1.2.
Changelog is ### REDACTED
.
Error: Resource not accessible by integration
Debug logging shows the following (some parts omitted).
...
::set-output name=new_tag::v0.1.2
##[debug]steps.tag_version.outputs.new_tag='v0.1.2'
Changelog is ### *** REDACTED
##[debug]
##[debug]'
##[debug]Creating annotated tag.
##[debug]Pushing new tag to the repo.
Error: Resource not accessible by integration
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Bump version and push tag
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the workflow_dispatch path using the shown permissions, commit_sha, and create_annotated_tag settings; inspect the tag-push path used by mathieudutour/github-tag-action@v6.0 and GitHub Actions token behavior for older commits. Done means the failure is explained and behavior is verified for both lightweight and annotated tags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, github-actions, typescript
- Domain
- ci-cd, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100