Fix image tag generation

Previously, only the immutable tags would get generated (i.e.
`5.1.2-1234`), but not the rolling tags (`5-apache`), due to a
limitation of the docker metadata action.
Thus, now we use manual regex matching instead.
See the linked issue for details.

Fixes https://github.com/martialblog/docker-limesurvey/issues/105
This commit is contained in:
Jack Henschel
2021-11-28 10:51:38 +01:00
parent 19a387488a
commit 8f1b452789
2 changed files with 26 additions and 12 deletions

View File

@@ -49,10 +49,11 @@ jobs:
images: | images: |
docker.io/martialblog/limesurvey docker.io/martialblog/limesurvey
tags: | tags: |
type=semver,pattern={{raw}},suffix=-apache type=match,pattern=(.+),group=1
type=semver,pattern={{major}},suffix=-apache type=match,pattern=^(\d+),group=1
flavor: | flavor: |
latest=false latest=false
suffix=-apache
- name: 'Build and push latest Apache container images' - name: 'Build and push latest Apache container images'
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
@@ -68,8 +69,11 @@ jobs:
images: | images: |
docker.io/martialblog/limesurvey docker.io/martialblog/limesurvey
tags: | tags: |
type=semver,pattern={{version}},suffix=-fpm type=match,pattern=(.+),group=1
type=semver,pattern={{major}},suffix=-fpm type=match,pattern=^(\d+),group=1
flavor: |
latest=false
suffix=-fpm
- name: 'Build and push latest fpm container images' - name: 'Build and push latest fpm container images'
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
@@ -85,8 +89,11 @@ jobs:
images: | images: |
docker.io/martialblog/limesurvey docker.io/martialblog/limesurvey
tags: | tags: |
type=semver,pattern={{version}},suffix=-fpm-alpine type=match,pattern=(.+),group=1
type=semver,pattern={{major}},suffix=-fpm-alpine type=match,pattern=^(\d+),group=1
flavor: |
latest=false
suffix=-fpm-alpine
- name: 'Build and push latest fpm-alpine container images' - name: 'Build and push latest fpm-alpine container images'
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:

View File

@@ -49,10 +49,11 @@ jobs:
images: | images: |
docker.io/martialblog/limesurvey docker.io/martialblog/limesurvey
tags: | tags: |
type=semver,pattern={{raw}},suffix=-apache type=match,pattern=(.+),group=1
type=semver,pattern={{major}},suffix=-apache type=match,pattern=^(\d+),group=1
flavor: | flavor: |
latest=false latest=false
suffix=-apache
- name: 'Build and push LTS apache container images' - name: 'Build and push LTS apache container images'
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
@@ -68,8 +69,11 @@ jobs:
images: | images: |
docker.io/martialblog/limesurvey docker.io/martialblog/limesurvey
tags: | tags: |
type=semver,pattern={{version}},suffix=-fpm type=match,pattern=(.+),group=1
type=semver,pattern={{major}},suffix=-fpm type=match,pattern=^(\d+),group=1
flavor: |
latest=false
suffix=-fpm
- name: 'Build and push LTS fpm container images' - name: 'Build and push LTS fpm container images'
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
@@ -85,8 +89,11 @@ jobs:
images: | images: |
docker.io/martialblog/limesurvey docker.io/martialblog/limesurvey
tags: | tags: |
type=semver,pattern={{version}},suffix=-fpm-alpine type=match,pattern=(.+),group=1
type=semver,pattern={{major}},suffix=-fpm-alpine type=match,pattern=^(\d+),group=1
flavor: |
latest=false
suffix=-fpm-alpine
- name: 'Build and push LTS fpm-alpine container images' - name: 'Build and push LTS fpm-alpine container images'
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with: