Skip to content

Commit 31c25c8

Browse files
committed
Fixing semver + extension
1 parent 0645400 commit 31c25c8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/dockerimage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
if: github.ref == 'refs/heads/main'
5151
run: |
5252
# shellcheck disable=SC2086
53-
VERSION="$(\grep ${REPOSITORY}/Dockerfile -e '^FROM' | \head -n 1 | \sed -e 's/[-_][^:]*@.*$//; s/^.*://;')"
54-
if [[ "${VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then
53+
VERSION="$(\grep ${REPOSITORY}/Dockerfile -e '^FROM' | \head -n 1 | \sed -e 's/[-_][^:]*@.*$//; s/^.*://; s/\.\([0-9]\)*$/-\1/;')"
54+
if [[ "${VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+\-[0-9]+$ ]] ; then
5555
\echo "VERSION=${VERSION}" >> "${GITHUB_ENV}"
5656
fi
5757
- name: Check if release already exists

.github/workflows/dockerrelease.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
type=ref,event=branch
2727
type=ref,event=pr
2828
type=semver,pattern={{version}}
29+
type=semver,pattern={{major}}.{{minor}}.{{patch}}
2930
type=semver,pattern={{major}}.{{minor}}
3031
type=semver,pattern={{major}}
3132
type=sha

0 commit comments

Comments
 (0)