diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ffc5ccf..8f9205b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -32,12 +32,16 @@ jobs: [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - [ "$VERSION" == "master" ] && VERSION=latest echo IMAGE_ID=$IMAGE_ID echo VERSION=$VERSION docker tag $IMAGE_NAME $IMAGE_ID:$VERSION docker push $IMAGE_ID:$VERSION + if [[ $VERSION =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then + docker tag $IMAGE_ID:$VERSION $IMAGE_ID:latest + docker push $IMAGE_ID:$VERSION + fi + # build repoUrl # change all uppercase characters to lowercase # strip git ref prefix from version