Skip to content
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 do not work when fetch-depth > 0 #1662

Open
marcindabrowski opened this issue Mar 15, 2024 · 6 comments · May be fixed by #2106
Open

fetch-tags=true do not work when fetch-depth > 0 #1662

marcindabrowski opened this issue Mar 15, 2024 · 6 comments · May be fixed by #2106

Comments

@marcindabrowski
Copy link

marcindabrowski commented Mar 15, 2024

Description of the fetch-tags says: Whether to fetch tags, even if fetch-depth > 0,
but it seems that action in version 4.1.1 do not pull the tags, only the PR branch.

I set these action options:

fetch-depth: 1
fetch-tags: true
ref: ${{ github.head_ref }}
@marcindabrowski marcindabrowski changed the title fetch-tags=true do not work when fetch-depth != 0 fetch-tags=true do not work when fetch-depth > 0 Mar 15, 2024
@salvianreynaldi
Copy link

duplicate of #1467.
From my exp, the posted workaround works (git fetch manually)

@Ottapettavan
Copy link

#417 #415

@Ottapettavan
Copy link

Description of the fetch-tags says: Whether to fetch tags, even if fetch-depth > 0, but it seems that action in version 4.1.1 do not pull the tags, only the PR branch.

I set these action options:

fetch-depth: 1
fetch-tags: true
ref: ${{ github.head_ref }}

@lucasoares
Copy link

Same in here.

@togakangaroo
Copy link

I'm seeing this as well.

I turned on action debugging and can see the git commands being run, specifically the fetch is this

git -c protocol.version=2 fetch --prune --no-recurse-submodules --depth=1 origin +c9787a9d432669beb6e566e710fe8afd6ad8f9cd:refs/remotes/origin/dev-17340

In order to do the right thing we would need the --tags flag in there

@rochacon rochacon linked a pull request Mar 7, 2025 that will close this issue
@rochacon
Copy link

rochacon commented Mar 7, 2025

@togakangaroo do you have a test repository at hand? Can you point it to my PR above and check if that fix the issue for you?

Your tip made me find the related code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants