@@ -41,26 +41,41 @@ jobs:
4141 # releasebranch_8_3-alpine, releasebranch_8_3-debian, releasebranch_8_3-ubuntu
4242 # For a release, e.g. 8.3.0, created tags are:
4343 # 8.3.0-alpine, 8.3.0-debian, 8.3.0-ubuntu and latest (with ubuntu)
44- docker-os-matrix :
45- name : ${{ matrix.os }}
44+ build :
4645 runs-on : ubuntu-latest
4746 concurrency :
4847 group : >-
49- ${{ github.workflow }}-${{ matrix.os }}-${{ github.event_name }}-
48+ ${{ github.workflow }}-${{ matrix.name }}-${{ github.event_name }}-
5049 ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
5150 # Cancel in progress in pull requests.
5251 # Otherwise, limit to one in progress and one queued for each type.
5352 # Only the latest queued job per event type will be kept, older will be cancelled.
5453 # The already running job will be completed.
5554 cancel-in-progress : ${{ github.event_name == 'pull_request' }}
5655 strategy :
57- matrix :
58- os :
59- - alpine
60- - debian
61- - ubuntu
62- - ubuntu_wxgui
6356 fail-fast : false
57+ matrix :
58+ include :
59+ - name : alpine
60+ os : alpine
61+ dockerfile : docker/alpine/Dockerfile
62+ build_args : |-
63+ GUI=without
64+ - name : debian
65+ os : debian
66+ dockerfile : docker/debian/Dockerfile
67+ build_args : |-
68+ GUI=without
69+ - name : ubuntu
70+ os : ubuntu
71+ dockerfile : docker/ubuntu/Dockerfile
72+ build_args : |-
73+ GUI=without
74+ - name : ubuntu_wxgui
75+ os : ubuntu
76+ dockerfile : docker/ubuntu/Dockerfile
77+ build_args : |-
78+ GUI=with
6479
6580 permissions :
6681 attestations : write
@@ -108,7 +123,7 @@ jobs:
108123 latest="${{
109124 (github.ref || format('{0}{1}', 'refs/tags/', github.event.release.tag_name))
110125 == format('refs/tags/{0}', steps.tag-branch.outputs.latest_tag)
111- && matrix.os == 'ubuntu' && steps.tag-branch.outputs.error_latest == 'no' }}"
126+ && matrix.name == 'ubuntu' && steps.tag-branch.outputs.error_latest == 'no' }}"
112127 current="${{
113128 ( contains(fromJSON('["tag", "release"]'), github.event_name)
114129 && (github.ref || format('{0}{1}', 'refs/tags/', github.event.release.tag_name))
@@ -139,11 +154,11 @@ jobs:
139154 type=raw,value=latest,enable=${{ steps.enable.outputs.latest }},suffix=
140155 flavor : |
141156 latest=false
142- suffix=-${{ matrix.os }}
157+ suffix=-${{ matrix.name }}
143158 - name : Set up QEMU
144159 uses : docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
145160 - name : Set up Docker Buildx
146- uses : docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
161+ uses : docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
147162 - name : Login to GitHub Container Registry
148163 uses : docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
149164 with :
@@ -162,8 +177,9 @@ jobs:
162177 with :
163178 push : ${{ github.event_name != 'pull_request' }}
164179 context : .
180+ build-args : ${{ matrix.build_args }}
165181 tags : ${{ steps.meta.outputs.tags }}
166- file : docker/ ${{ matrix.os }}/Dockerfile
182+ file : ${{ matrix.dockerfile }}
167183 annotations : ${{ steps.meta.outputs.annotations }}
168184 provenance : mode=max
169185 sbom : true
@@ -179,7 +195,7 @@ jobs:
179195 env :
180196 STEPS_DOCKER_BUILD_OUTPUTS_DIGEST : ${{ steps.docker_build.outputs.digest }}
181197 - name : Attest docker.io image
182- uses : actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0 .0
198+ uses : actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1 .0
183199 # If there isn't a digest, an annotation cannot be added
184200 if : >-
185201 ${{ github.repository_owner == 'OSGeo' && github.event_name != 'pull_request'
@@ -190,7 +206,7 @@ jobs:
190206 subject-digest : ${{ steps.docker_build.outputs.digest }}
191207 push-to-registry : ${{ github.repository_owner == 'OSGeo' && github.event_name != 'pull_request' }}
192208 - name : Attest ghcr.io image
193- uses : actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0 .0
209+ uses : actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1 .0
194210 # If there isn't a digest, an annotation cannot be added
195211 if : ${{ steps.docker_build.outputs.digest }}
196212 id : attest-ghcr
0 commit comments