-
Notifications
You must be signed in to change notification settings - Fork 6
Tags are not fetched if workflow is not triggered by tag #351
Tags are not fetched if workflow is not triggered by tag #351
Comments
To provide a bit more context that might be useful:
Apparently it was solved by actions/checkout#579. So IIUC, this would fetch tags "reachable" from the last 5 commits:
|
I think if your workflow needs tag information than your VM/container has I also have a gut feeling that if you limited clone depth and then do fetch tags than you'll fetch the whole history. |
This docs update is greatly appreciated, thank you. BTW I edited my original post to include this:
Maybe additional env var |
ping @fkorotkov - this issue was automatically closed becuase cirruslabs/cirrus-ci-docs#1270 was merged. I still would like to hear what you think about this. I understand you're very busy, so I'd be happy to contribute this small feature myself if you agree. |
I don't have strong opinion on that. Checked sources and seems not a big change so let's introduce it along other |
Thank you! |
I would like to always have my git tags, so I can use them for things like deploying releases etc. Currently, when my Cirrus CI workflow is not triggered by pushing a tag, no tags are fetched (i.e.
git tag -l
returns nothing).I think it's confusing and not documented. For example GitHub's actions/checkout fetches all tags when
fetch-depth: 0
is specified. On the other hand, Cirrus CI does not fetch tags at all, even ifCIRRUS_CLONE_DEPTH=0
is specified (in fact, it's the default).Seems like the offending code is:
Current workaround is to run
git fetch --tags
as ascript
step, but this is not ideal since the container/VM might not havegit
installed. In other words, I want to use Cirrus Agent's builtingo-git
.The text was updated successfully, but these errors were encountered: