Skip to content

Commit

Permalink
fix: fetch tags correctly across workflows
Browse files Browse the repository at this point in the history
Signed-off-by: lvlcn-t <[email protected]>
  • Loading branch information
lvlcn-t committed Nov 19, 2024
1 parent cd20df8 commit b38a9f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ jobs:
with:
fetch-tags: true

# We don't use checkout/fetch-tags: true because it's broken
# For more information see: https://github.com/actions/checkout/issues/1471
- name: Fetch tags explicitly
run: git fetch --tags
run: git fetch --prune --unshallow --tags

- name: Registry login
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ jobs:
with:
python-version: "3.12"

# We need to fetch tags because of the helm-docs pre-commit hook which requires the latest tag.
# We don't use checkout/fetch-tags: true because it's broken
# For more information see: https://github.com/actions/checkout/issues/1471
- name: Fetch tags explicitly
run: git fetch --prune --unshallow --tags

- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
Expand Down

0 comments on commit b38a9f2

Please sign in to comment.