[BUG] Failed to retrieve - Invalid tag? - Because of: HttpError: Not Found
cYKatherine opened this issue · 9 comments
I got the above error when using mikepenz/release-changelog-builder-action@v4
I know it's similar to #276 but since that's closed I'm moving the discussion to here. I've created two releases with below tags, but it's still showing invalid tag. Can you help me look into this please? Thank you!
Good day.
The action likely has no access to those tags. Which token do you provide for it to run?
Please also provide how you configure the action in your CI yaml file?
Hello @mikepenz , thank you so much for the quick response!
name: Build Docker Changelog
id: github_release_docker
if: ${{ inputs.is_release == 'true' && inputs.publish_platform == 'Docker'}}
uses: mikepenz/release-changelog-builder-action@v4
with:
toTag: v${{ inputs.version_number_input }}
configurationJson: |
{
"template": "#{{CHANGELOG}}\n## Installation\n```\ndocker pull ${{ inputs.tags }}\n```\n\n## Image reference to deploy: \n```\n${{ inputs.image_tag }}\n```\n\n## Changelog\n#{{UNCATEGORIZED}}",
"pr_template": " - #{{TITLE}} - ( PR: ##{{NUMBER}} )"
}
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
Above is my yaml file. I passed in the github_token
through inputs as there are several layers of call to pass this through. The github_token
value should be legit as I am able to do actions like docker/login-action@v3
using this value.
Thank you.
Yes that should in general work.
The error is thrown by the code here:
And is usually giving Not found if the request does not succeed for the token:
the tags are on this repo you execute for? And the token should have read access to pull requests and commits?
In case, please validate the permissions are granted: https://github.com/mikepenz/release-changelog-builder-action?tab=readme-ov-file#token-permission
The v0.10.16
is the latest tag we are releasing to: toTag: v${{ inputs.version_number_input }}
, I don't think we need to have that to see the changelog?
if you specify the tag it has to exist as tag. If the tag does not exist, you can pass in the git ref (commit sha) instead of the state you want to compare with.
The action fails as it tries to get the state from the toTag
you pass, which does not exist.
@cYKatherine awesome news! glad I was able to help.