Skip to content

Commit

Permalink
Fix Docker CI workflow
Browse files Browse the repository at this point in the history
As we are triggered by the `PyPI` workflow and not directly by the push
of the Git tag, extracting the version from `GITHUB_REF_NAME` won't
work. Calling `git describe` instead also allows the workflow to be run
manually, which makes things easier in general.

Fixes: #118
  • Loading branch information
easybe committed Sep 4, 2024
1 parent d5d7784 commit 27b8cec
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set GOOSEBIT_VERSION env var
run: |
if [ $GITHUB_REF_TYPE = tag ]; then
tag=$GITHUB_REF_NAME
else
echo "This job is only supposed to be run for Git tags"
exit 1
fi
tag=$(git describe --tags --abbrev=0)
echo "GOOSEBIT_VERSION=${tag#v}" >> $GITHUB_ENV
- name: Log in to Docker Hub
Expand Down

0 comments on commit 27b8cec

Please sign in to comment.