New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't fetch with fetch-tags
when triggered by tag
#1467
Comments
UPDATE: seems just removing the Same problem here: https://github.com/serious-scaffold/serious-scaffold-python/actions/runs/6142805118/job/16665155663 |
This seems to cause a conflict when the workflow is triggered by a tag itself: actions/checkout#1467
See eg actions/checkout#1467 trying an explicit fetch-depth as per comments there.
When I run an action on a tag, I noticed that:
Doesn't work and results in "Error: fatal: Cannot fetch both...".
Does work. |
Fix cannot fetch both <commit> and tags following the suggestion: actions/checkout#1467 (comment)
Due to a bug in the `actions/checkout@v4` workflow, `git fetch` fails when the workflow was triggered by a tag: actions/checkout#1467
The observed behavior seems to be a bug, see actions/checkout#1467.
Apparently i'm special and the workaround for actions/checkout#1467 doesn't work for me.
Apparently i'm special and the workaround for actions/checkout#1467 doesn't work for me.
For some reason the Looking at my build logs, it seems like the commit the tag is pointing to is fetched by its hash but stored under the ref of the tag. Since git sees that a tag is attached to this commit, it tries to fetch this as well and store it under the same ref. That is causing the conflict git complains about. Right now, when i fetch the tags manually after checkout, i have to specify |
Currently, the checkout GitHub Action failed to check out when both `fetch-depth` and `fetch-tags` are specified during a tag push event(actions/checkout#1467). This patch workarounds the issue by manually do the tag fetch afterwards. Refer-to: Can't fetch with `fetch-tags` when triggered by tag · Issue #1467 · actions/checkout <actions/checkout#1467> Refer-to: Switch back to an improved manual tag fetching method · wxFormBuilder/wxFormBuilder@459563b <wxFormBuilder/wxFormBuilder@459563be8> Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
Currently, the checkout GitHub Action failed to check out when both `fetch-depth` and `fetch-tags` are specified during a tag push event(actions/checkout#1467). This patch workarounds the issue by manually do the tag fetch afterwards. Refer-to: Can't fetch with `fetch-tags` when triggered by tag · Issue #1467 · actions/checkout <actions/checkout#1467> Refer-to: Switch back to an improved manual tag fetching method · wxFormBuilder/wxFormBuilder@459563b <wxFormBuilder/wxFormBuilder@459563be8> Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
This is hopefully just a temporary fix for actions/checkout#1467
This is hopefully just a temporary fix for actions/checkout#1467
Can't use fetch-tags on a tag apparently. See actions/checkout#1467.
It seems that `fetch-tags` is buggy when triggering action on tag: actions/checkout#1467 Signed-off-by: Marek Pikuła <marek@serenitycode.dev>
It seems that `fetch-tags` is buggy when triggering action on tag: actions/checkout#1467 Signed-off-by: Marek Pikuła <marek@serenitycode.dev>
fatal: Cannot fetch both 8c823bf and refs/tags/v0.15.3 to refs/tags/v0.15.3 actions/checkout#1467
any update on this issue? |
also hit this on any update? |
did anyone find a work-around that works with also running into this with |
@oshina-gravity I worked around the issue by fetching my tag of interest manually from
This has also resolved another issue with |
The actions/checkout step has some bugs: actions/checkout#1467 Change-Id: I6bd88433425657081c2033b55bf01587979983df
fatal: Cannot fetch both 8c823bfe0180c56c89e9a54148c196fb1df3ba5b and refs/tags/v0.15.3 to refs/tags/v0.15.3 actions/checkout#1467
Getting the following error:
Error: fatal: Cannot fetch both <sha> and refs/tags/<tag> to refs/tags/<tag>
Example workflow:
Example of a failing run.
Raw log
What am I doing wrong here?
The text was updated successfully, but these errors were encountered: