Skip to content

Commit

Permalink
Workaround for github tags override
Browse files Browse the repository at this point in the history
I can see in publish workflow that we try to build `0.0.0-HEAD-eb72104a`
 version instead of expected 9.0.0. It seems it come from removal of
 annotated tags by github/checkout action.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
  • Loading branch information
giggsoff authored and eriknordmark committed Dec 22, 2022
1 parent 06c5905 commit 1c81910
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Force fetch annotated tags (workaround)
# Workaround for https://github.com/actions/checkout/issues/290
run: |
git fetch --force --tags
- name: Determine architecture prefix and ref
env:
REF: ${{ github.ref }}
Expand All @@ -58,15 +61,6 @@ jobs:
docker login -u "${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }}" --password-stdin
- name: Build packages
run: |
# GH Actions convert our annotated tags into plain ones,
# so we need to convert it back (but only if it exists).
if [ -n "$(git tag)" ]; then
git config --global user.name "Edge Virtualization Engine"
git config --global user.email "eve@lfedge.org"
for t in $(git tag); do
git tag -a -m"Release $t" -f "$t" "$t"
done
fi
# sadly, our build sometimes times out on network access
# and running out of disk space: re-trying for 3 times
for i in 1 2 3; do
Expand Down Expand Up @@ -113,6 +107,10 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Force fetch annotated tags (workaround)
# Workaround for https://github.com/actions/checkout/issues/290
run: |
git fetch --force --tags
- name: Login to DockerHUB
run: |
echo "${{ secrets.RELEASE_DOCKERHUB_TOKEN }}" |\
Expand Down Expand Up @@ -165,6 +163,10 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Force fetch annotated tags (workaround)
# Workaround for https://github.com/actions/checkout/issues/290
run: |
git fetch --force --tags
- name: Login to DockerHUB
run: |
echo "${{ secrets.RELEASE_DOCKERHUB_TOKEN }}" |\
Expand Down

0 comments on commit 1c81910

Please sign in to comment.