Checkout: git describe --abbrev=0 shows wrong tag

Created on 8 Jun 2020  路  5Comments  路  Source: actions/checkout

Something looks wrong with git describe --abbrev=0 I use this

  - name: Checkout
    uses: actions/[email protected]
    with:
      fetch-depth: 0

and I even do a git fetch --all Please see here

to grab latest git tag. This is an example with wrong output

Local on my machine I see with git tag -n

1.0.6.13 Attempt to fix git tag
1.0.6.14 1.0.6.14
1.0.6.15 1.0.6.15
1.0.6.16 1.0.6.16
1.0.6.17 1.0.6.17

but on Github CI

1.0.6.13 Attempt to fix git tag
1.0.6.14 1.0.6.14
1.0.6.15 1.0.6.15
1.0.6.16 1.0.6.16
1.0.6.17 Revert "remove Travis"

Local on my machine I see with git log --oneline

881b9db (HEAD -> refs/heads/LogActivity, tag: refs/tags/1.0.6.17, refs/remotes/origin/LogActivity) Revert "remove Travis"
99dddbb (tag: refs/tags/1.0.6.15, tag: refs/tags/1.0.6.14) Attempt to fix release tag
27612c5 (tag: refs/tags/1.0.6.13) Attempt to fix release tag
c3bcdb8 (tag: refs/tags/1.0.6.12) Attempt to fix release tag
3c7ce1d (tag: refs/tags/1.0.6.11) LogActivity

on Github CI the output is this. At least the current commit is right 馃憤

881b9db Revert "remove Travis"
99dddbb Attempt to fix release tag
27612c5 Attempt to fix release tag
c3bcdb8 Attempt to fix release tag
3c7ce1d LogActivity

Local on my machine I see with git describe --abbrev=0

1.0.6.17

on Github CI the output is this

1.0.6.15

I verify the same command with Travis, and there it looks (expected) like my local machine.

Has someone an idea what's wrong here ?

Most helpful comment

    uses: actions/[email protected]
    with:
      submodules: true
      fetch-depth: 0

Still shows wrong tag with git describe --abbrev=0

https://github.com/hannesa2/owncloud-android/pull/5/checks?check_run_id=825271697

It shows me 2.15.0.1 instead of 2.15.0.2. Local it shows me 2.15.0.2
image

image

All 5 comments

It would seem v2 does not pull anything except the current tag. This is causing us problems as well.
Relevant code:
https://github.com/actions/checkout/blob/fb6f360df236bd2026c7963cf88c8ddf20b4f0e2/src/git-command-manager.ts#L171-L175

I failed at reading thoroughly. It seems this issue has already been addressed. I recommend using the suggestion in the readme.
https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches

I failed at reading thoroughly. It seems this issue has already been addressed. I recommend using the suggestion in the readme.
https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches

Did you looked in my first post ? For me it looks like a bug

image

    uses: actions/[email protected]
    with:
      submodules: true
      fetch-depth: 0

Still shows wrong tag with git describe --abbrev=0

https://github.com/hannesa2/owncloud-android/pull/5/checks?check_run_id=825271697

It shows me 2.15.0.1 instead of 2.15.0.2. Local it shows me 2.15.0.2
image

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zeke picture zeke  路  7Comments

thewavelength picture thewavelength  路  7Comments

jcharnley picture jcharnley  路  4Comments

gitfool picture gitfool  路  3Comments

pdcmoreira picture pdcmoreira  路  3Comments