@@ -17,6 +17,7 @@ defaults:
1717 shell : bash
1818
1919env :
20+ PUSH : ${{ github.event == 'push' && github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
2021 CONTAINER_REGISTRY : ghcr.io
2122 BUILDKIT_PROGRESS : plain
2223 CONAN_VERSION : 2.19.1
4142 - release : bullseye
4243 compiler_name : gcc
4344 compiler_version : 12
45+ - release : bullseye
46+ compiler_name : gcc
47+ compiler_version : 13
48+ - release : bullseye
49+ compiler_name : gcc
50+ compiler_version : 14
51+ - release : bullseye
52+ compiler_name : gcc
53+ compiler_version : 15
4454 - release : bookworm
4555 compiler_name : gcc
4656 compiler_version : 12
@@ -94,41 +104,8 @@ jobs:
94104 PLATFORM=${{ matrix.architecture.platform }}
95105 echo "PLATFORM_PAIR=${PLATFORM//\//-}" >> $GITHUB_ENV
96106 if [ "${{ matrix.os.release == 'bullseye' }}" == "true" ]; then
97- echo "CONTAINER_REPOSITORY_GCC=${CONTAINER_REPO}/debian-gcc" >> $GITHUB_ENV
98- echo "CONTAINER_IMAGE_GCC=${CONTAINER_REGISTRY}/${CONTAINER_REPO}/debian-gcc" >> $GITHUB_ENV
107+ echo "CONTAINER_IMAGE_GCC=${CONTAINER_REGISTRY}/${CONTAINER_REPO}/gcc" >> $GITHUB_ENV
99108 fi
100- - name : Prepare gcc image metadata
101- if : ${{ env.CONTAINER_IMAGE_GCC }}
102- id : meta-gcc
103- uses : docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
104- env :
105- DOCKER_METADATA_ANNOTATIONS_LEVELS : manifest,manifest-descriptor
106- with :
107- images : ${{ env.CONTAINER_IMAGE_GCC }}
108- labels : |
109- org.opencontainers.image.authors=For inquiries, please use https://${{ github.repository }}/issues
110- org.opencontainers.image.documentation=https://${{ github.repository }}
111- org.opencontainers.image.vendor=XRPLF
112- org.opencontainers.image.title=${{ env.CONTAINER_REPOSITORY_GCC }}
113- - name : Build gcc image
114- # Note, we always push this image, otherwise steps.build will fail.
115- # Also, because we always push it, we intentionally do not tag it.
116- # TODO: Move to separate workflow or job
117- if : ${{ env.CONTAINER_IMAGE_GCC }}
118- id : build-gcc
119- uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
120- with :
121- build-args : |
122- BUILDKIT_DOCKERFILE_CHECK=skip=InvalidDefaultArgInFrom
123- BUILDKIT_INLINE_CACHE=1
124- context : .
125- file : docker/debian/Dockerfile.gcc-${{ matrix.os.compiler_version }}-${{ matrix.os.release }}
126- outputs : type=image,name=${{ env.CONTAINER_IMAGE_GCC }},push-by-digest=true,name-canonical=true,push=true
127- platforms : ${{ matrix.architecture.platform }}
128- provenance : mode=max
129- push : true
130- sbom : true
131- labels : ${{ steps.meta-gcc.outputs.labels }}
132109 - name : Prepare container metadata
133110 id : meta
134111 uses : docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
@@ -158,24 +135,24 @@ jobs:
158135 CMAKE_VERSION=${{ env.CMAKE_VERSION }}
159136 MOLD_VERSION=${{ env.MOLD_VERSION }}
160137 DEBIAN_VERSION=${{ matrix.os.release }}
161- BASE_IMAGE=${{ env.CONTAINER_IMAGE_GCC && format('{0}@ {1}', env.CONTAINER_IMAGE_GCC, steps.build-gcc.outputs.digest ) || format('gcc:{0}-{1}', matrix.os.compiler_version, matrix.os.release) }}
138+ BASE_IMAGE=${{ env.CONTAINER_IMAGE_GCC && format('{0}: {1}-{2} ', env.CONTAINER_IMAGE_GCC, matrix.os.compiler_version, matrix.os.release ) || format('gcc:{0}-{1}', matrix.os.compiler_version, matrix.os.release) }}
162139 context : .
163140 file : docker/debian/Dockerfile
164- outputs : type=image,name=${{ env.CONTAINER_IMAGE }},push-by-digest=true,name-canonical=true,push=true
141+ outputs : type=image,name=${{ env.CONTAINER_IMAGE }},push-by-digest=true,name-canonical=true,push=${{ env.PUSH }}
165142 platforms : ${{ matrix.architecture.platform }}
166143 provenance : mode=max
167- push : ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
144+ push : ${{ env.PUSH }}
168145 sbom : true
169146 labels : ${{ steps.meta.outputs.labels }}
170147 target : ${{ matrix.os.compiler_name }}
171148 - name : Export digest
172- if : ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
149+ if : ${{ env.PUSH }}
173150 run : |
174151 mkdir -p /tmp/digests
175152 DIGEST="${{ steps.build.outputs.digest }}"
176153 touch "/tmp/digests/${DIGEST#sha256:}"
177154 - name : Upload digest
178- if : ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
155+ if : ${{ env.PUSH }}
179156 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
180157 with :
181158 name : digests-${{ matrix.os.release }}-${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-${{ env.PLATFORM_PAIR }}
@@ -184,13 +161,22 @@ jobs:
184161 retention-days : 1
185162
186163 merge :
187- if : ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
164+ if : ${{ github.event == 'push' && github. ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
188165 strategy :
189166 matrix :
190167 os :
191168 - release : bullseye
192169 compiler_name : gcc
193170 compiler_version : 12
171+ - release : bullseye
172+ compiler_name : gcc
173+ compiler_version : 13
174+ - release : bullseye
175+ compiler_name : gcc
176+ compiler_version : 14
177+ - release : bullseye
178+ compiler_name : gcc
179+ compiler_version : 15
194180 - release : bookworm
195181 compiler_name : gcc
196182 compiler_version : 12
0 commit comments