Skip to content

Commit

Permalink
fix: parse tag in github action of docker.yml
Browse files Browse the repository at this point in the history
Signed-off-by: zemyblue <zemyblue@gmail.com>
  • Loading branch information
zemyblue committed Jun 19, 2023
1 parent 13a09a3 commit b9a297a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,13 @@ jobs:
- name: Parse tag
id: tag
run: |
VERSION=$(echo ${{ github.ref_name }} | sed "s/v//")
echo "VERSION=$VERSION" >> $GITHUB_ENV
ref='refs/tags/'
if [[ ${{ github.ref }} == *${ref}* ]]; then
VERSION=$(echo ${{ github.ref_name }} | sed "s/v//")
echo "VERSION=$VERSION" >> $GITHUB_ENV
else
echo "VERSION=${{ github.sha }}" >> $GITHUB_ENV
fi
- name: Extract metadata for docker
id: meta
Expand Down

0 comments on commit b9a297a

Please sign in to comment.