-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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.
Here is bug of actions/checkout: actions/checkout#1467
Here is bug of actions/checkout: actions/checkout#1467
This is a partial revert of 0115c28; apparently actions/checkout's "fetch-tags" property is broken and gives errors at checkout time. Ref: actions/checkout#1467
This is a partial revert of 0115c28; apparently actions/checkout's "fetch-tags" property is broken and gives errors at checkout time. Ref: actions/checkout#1467
Fetch git tags manually. Ref actions/checkout#1467
Fetch git tags manually. Becasue of actions/checkout#1467
It sounds like fetch tags is not needed? actions/checkout#1467 Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
It sounds like fetch tags is not needed? actions/checkout#1467 Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
Looking at https://github.com/actions/checkout/blob/eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871/dist/index.js#L657 it seems to me, that all |
Can't do that through actions/checkout due to actions/checkout#1467
Can't do that through actions/checkout due to actions/checkout#1467
Can't do that through actions/checkout due to actions/checkout#1467
This is a workaround to actions/checkout#1467
The fetch-tags during checkout is not effective. actions/checkout#1467 (comment)
`fetch-tags: true` in the checkout action does not work as expected and causes an error: Error: fatal: Cannot fetch both 2704e6e and refs/tags/v20241203 to refs/tags/v20241203 The issue is described in actions/checkout#1467 We will just fetch the tags manually
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: