-
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
fetch-tags: true doesn't actually fetch any tags #1471
Comments
Up, it would be nice to address this. |
This is so annoying and confusing. I set |
Reporting here because I spent a few days trying to figure out why my project's release workflow was failing due to the wheels having the wrong version number. After some digging, it turned out that this change was the cause of this failure since |
Can confirm its still broken...
- name: Checkout
uses: actions/checkout@v4
- name: Fetch tags
run: git fetch --prune --unshallow --tags |
Another possible option is to use filters: - uses: actions/checkout@v3
with:
fetch-depth: 0
filter: tree:0 See #1396. |
Please note that So it is true that your solution works, it is not better but more worldly than just using this:
|
Workaround for actions/checkout#1471
Is this resolved? |
* 🚧 switch mamba installation - see if snakemake envs are somehow cached * 🐛 specify python version, move ls * 🚧 deactivate some workflow, run relatvie ls command * try not to cache * 🚧 test using venv created by codespace with python 3.12 - might be that I need to create (not sure what change in runner configurations) * try to use full snakemake installation * 🚧 use miniconda for pypi installation test * try miniconda again - snakemake environment has it's own mamba installation - auto-activate environment "test" * install build dependencies, fix ubuntu first * 🐛 try to put mamba below 2.0 snakemake/snakemake#3108 * test should be activate per default * 🚧 conda env not activated... * 🐛 pip does not install in environment * 🚧 experiment * 🐛 shell was not iniated * 🐛 test installing njab separately * 🐛 order matters! * try again new order, add umap-learn explicitly * 🐛 do not re-install njab * restrict scipy (trapz missing in lifelines) latest scipy not supported by lifelines * 🐛 exclude numpy 2.0 for now * numpy try two * swap numpy and njab, adapt other pkg to what it was before * add back umap learn, relax constraints * 🚧 in package single requirement single packages cannot be specified to just ignore the dependencies. * ➖ remove scipy dependency - leave it to njab to install dependencies in a second step. * ⬆️ remove support for python 3.8 (end-of-life) * 🎨 setuptools_scm uses tags to determine version, add tags * 🐛 tags not fetched without entire history see actions/checkout#1471 * 🎨 clean-up workflow file * ✨ add njab after update to requirements - enable again more workflows (using mamba constraint snakemake environement) * 🔥 remove comments, ⏪ add back tests * 🐛 make order explicit (by feat freq or bin and bin count) * 🐛 fix order of example more explicitly. * 🐛 actually test latest version of pimms, remove comments * 🐛 runs natively in colab without issues
This is because fetching tags only doesn't work. See actions/checkout#1471 The simplest is to download the whole repo, since it's sufficiently small. The action will take a bit longer, but that's a small price to pay.
This is because fetching tags only doesn't work. See actions/checkout#1471 The simplest is to download the whole repo, since it's sufficiently small. The action will take a bit longer, but that's a small price to pay.
Add a GitHub Action to publish docs automatically, whenever someone pushes against the "main" branch. Note we have chosen to implement the actual business logic of publishing docs as part of the Makefile, rather than as part of the GitHub Action directly. This means we only use the GitHub action to *automate* the invocation of pre-existing business logic. This allows us to run the exact same logic both locally and within a GitHub Action. See here for interesting context: https://news.ycombinator.com/item?id=33751533 Also note we fetch tags explicitly, because the "checkout" action seems to have broken semantics. See here for a ton of context: actions/checkout#1471 Also note we set git-specific environment variables for author and committer username/email explicitly to make the new commits in the "gh-pages" branch appear as coming from the GitHub Actions bot. Otherwise git was complaining that it couldn't determine the identity of the author and/or committer. See here for details: https://github.com/actions/checkout#push-a-commit-using-the-built-in-token https://github.com/orgs/community/discussions/26560 Finally, ensure the docs-clean target actually depends on having created the managed Python virtualenv, because it needs Sphinx-provided commands. Signed-off-by: Vangelis Koukis <[email protected]>
Add a GitHub Action to publish docs automatically, whenever someone pushes against the "main" branch. Note we have chosen to implement the actual business logic of publishing docs as part of the Makefile, rather than as part of the GitHub Action directly. This means we only use the GitHub action to *automate* the invocation of pre-existing business logic. This allows us to run the exact same logic both locally and within a GitHub Action. See here for interesting context: https://news.ycombinator.com/item?id=33751533 Also note we fetch tags explicitly, because the "checkout" action seems to have broken semantics. See here for a ton of context: actions/checkout#1471 Also note we set git-specific environment variables for author and committer username/email explicitly to make the new commits in the "gh-pages" branch appear as coming from the GitHub Actions bot. Otherwise git was complaining that it couldn't determine the identity of the author and/or committer. See here for details: https://github.com/actions/checkout#push-a-commit-using-the-built-in-token https://github.com/orgs/community/discussions/26560 Finally, ensure the docs-clean target actually depends on having created the managed Python virtualenv, because it needs Sphinx-provided commands. Signed-off-by: Vangelis Koukis <[email protected]>
After #579 was merged and released with v3.6.0, the
fetch-tags
option was introduced and it's kind of a breaking change for projects that depend on reading tags from the git history. It sets--no-tags
in thegit fetch
command run by this action. I think this new option should have defaulted totrue
or introduced in v4 instead where it could possibly have had the defaultfalse
.Nevertheless, using
fetch-tags: true
without overriding the defaultfetch-depth: 1
actually doesn't fetch any tags unless the workflow was triggered by a tag push. So I think it's misleading and should be changed to fetch all tags iffetch-tags
is set totrue
. The change to thegit fetch
command run by this action would be to append'+refs/tags/*:refs/tags/*'
(tagsRefSpec
) to the end even thoughfetch-depth
is> 0
.Related issue: #1467
A possible workaround would be to run another
git fetch
after using this checkout action like in #579 (comment), but that feels hacky.Seems the author of the #579 PR also discussed supporting my use-case here: #579 (comment)
I'm sure that this added functionality would be very appreciated. Thanks for your consideration!
The text was updated successfully, but these errors were encountered: