From 06454009b70ce5be2c51fb8472dc6142bd10628d Mon Sep 17 00:00:00 2001 From: Thomas Leplus Date: Wed, 24 Apr 2024 19:07:30 -0300 Subject: [PATCH] Update dockerimage.yml --- .github/workflows/dockerimage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 17efa19..ee015d7 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -50,8 +50,8 @@ jobs: if: github.ref == 'refs/heads/main' run: | # shellcheck disable=SC2086 - VERSION="$(\grep ${REPOSITORY}/Dockerfile -e '^FROM' | \head -n 1 | \sed -e 's/@.*$//; s/^.*://;')" - if [[ "${VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then + VERSION="$(\grep ${REPOSITORY}/Dockerfile -e '^FROM' | \head -n 1 | \sed -e 's/[-_][^:]*@.*$//; s/^.*://;')" + if [[ "${VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then \echo "VERSION=${VERSION}" >> "${GITHUB_ENV}" fi - name: Check if release already exists