This commit is contained in:
Dave Horton
2023-04-10 09:00:19 -04:00
parent ba3ff42987
commit fcc4c0a5ce

View File

@@ -20,16 +20,16 @@ jobs:
- name: prepare tag
run: |
IMAGE_ID=jambonz/$IMAGE_NAME
export IMAGE_ID=jambonz/$IMAGE_NAME
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
export VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "main" ] && VERSION=latest
[ "$VERSION" == "main" ] && export VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION