Skip to content

Commit

Permalink
Fetch tags manually in publish workflow
Browse files Browse the repository at this point in the history
`fetch-tags: true` in the checkout action does not work as expected and
causes an error:

    Error: fatal: Cannot fetch both 2704e6e
    and refs/tags/v20241203 to refs/tags/v20241203

The issue is described in
actions/checkout#1467

We will just fetch the tags manually
  • Loading branch information
amercader committed Dec 3, 2024
1 parent 2704e6e commit cf4d18e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/reusable-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true

- name: Fetch tags
# Needed because of actions/checkout#1467
run: |
git fetch --tags --force
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down

0 comments on commit cf4d18e

Please sign in to comment.