Skip to content

Commit f0f6ac8

Browse files
committed
Support openresty w.x.y.z versioning scheme
1 parent 217bfa7 commit f0f6ac8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/docker-build-push.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ jobs:
7676
shell: bash
7777
run: |
7878
# shellcheck disable=SC2086
79-
VERSION="$(\grep ${REPOSITORY}/Dockerfile -e '^FROM' | \head -n 1 | \sed -e 's/@.*$//; s/^.*://;')"
80-
if [[ "${VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then
81-
\echo "VERSION=${VERSION}" >> "${GITHUB_ENV}"
79+
VERSION="$(\grep ${REPOSITORY}/Dockerfile -e '^FROM' | \head -n 1 | \sed -e 's/@.*$//; s/^.*://; s/\-.*$//;')"
80+
if [[ "${VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.([0-9]+)$ ]] ; then
81+
\echo "VERSION=${BASH_REMATCH[1]}-${BASH_REMATCH[2]}" >> "${GITHUB_ENV}"
8282
fi
8383
- name: Check if release already exists
8484
if: env.VERSION != ''

0 commit comments

Comments
 (0)