You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bug has been identified in version 4 of the actions/checkout GitHub Action, where the fetch-tags argument set to true fails to fetch tags. This issue is documented on GitHub.
Steps to Reproduce:
Create a new repository.
Add the following action file in the .github/workflows folder:
name: Create/update tagon:
workflow_dispatch:
jobs:
create-tag:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4with:
fetch-tags: true
- uses: rickstaa/action-create-tag@v1id: "tag_create"with:
tag: "latest"tag_exists_error: falsemessage: "Latest release"# Print result using the env variable.
- run: | echo "Tag already present: ${{ env.TAG_EXISTS }}"# Print result using the action output.
- run: | echo "Tag already present: ${{ steps.tag_create.outputs.tag_exists }}"
Push the latest tag to the branch to ensure its existence.
Run the action using the GitHub Action interface.
Observe that the tag is not found, and a hint: Updates were rejected because the tag already exists in the remote. error is thrown.
Expected Behavior:
As per the actions/checkout documentation, the provided action recipe should fetch tags, and the tag should be recognized as already present.
Solution:
As a temporary solution, update the README to instruct users to use the fetch-depth: 0 argument to fetch all tags until GitHub issue #1471 is resolved. Once fixed, the fetch-tags: true argument can be used again.
The text was updated successfully, but these errors were encountered:
Bug Description:
A bug has been identified in version 4 of the actions/checkout GitHub Action, where the
fetch-tags
argument set totrue
fails to fetch tags. This issue is documented on GitHub.Steps to Reproduce:
.github/workflows
folder:latest
tag to the branch to ensure its existence.hint: Updates were rejected because the tag already exists in the remote.
error is thrown.Expected Behavior:
As per the actions/checkout documentation, the provided action recipe should fetch tags, and the tag should be recognized as already present.
Solution:
As a temporary solution, update the README to instruct users to use the
fetch-depth: 0
argument to fetch all tags until GitHub issue #1471 is resolved. Once fixed, thefetch-tags: true
argument can be used again.The text was updated successfully, but these errors were encountered: