Skip to content

Commit

Permalink
Fixing semver + extension
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasleplus committed Apr 25, 2024
1 parent 0645400 commit 31c25c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]+\.[0-9]+$ ]] ; then
VERSION="$(\grep ${REPOSITORY}/Dockerfile -e '^FROM' | \head -n 1 | \sed -e 's/[-_][^:]*@.*$//; s/^.*://; s/\.\([0-9]\)*$/-\1/;')"
if [[ "${VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+\-[0-9]+$ ]] ; then
\echo "VERSION=${VERSION}" >> "${GITHUB_ENV}"
fi
- name: Check if release already exists
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dockerrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
Expand Down

0 comments on commit 31c25c8

Please sign in to comment.