@@ -19,6 +19,7 @@ defaults:
1919env :
2020 CONTAINER_REGISTRY : ghcr.io
2121 BUILDKIT_PROGRESS : plain
22+ LOCAL_GCC_IMAGE : localhost.localdomain/gcc
2223 CONAN_VERSION : 2.19.1
2324 GCOVR_VERSION : 8.3
2425 CMAKE_VERSION : 3.31.6
@@ -92,38 +93,22 @@ jobs:
9293 echo "CONTAINER_IMAGE=${CONTAINER_REGISTRY}/${CONTAINER_REPO}/debian-${{ matrix.os.release }}" >> $GITHUB_ENV
9394 PLATFORM=${{ matrix.architecture.platform }}
9495 echo "PLATFORM_PAIR=${PLATFORM//\//-}" >> $GITHUB_ENV
95- - name : Prepare gcc image metadata
96- if : ${{ matrix.os.release == 'bullseye' }}
97- id : meta-gcc
98- uses : docker/metadata-action@v5
99- env :
100- DOCKER_METADATA_ANNOTATIONS_LEVELS : manifest,manifest-descriptor
101- with :
102- # NOTE, tag and image must match base of docker/debian/Dockerfile
103- images : gcc
104- tags : |
105- type=raw,value=${{ matrix.os.compiler_version }}-${{ matrix.os.release }}
106- labels : |
107- org.opencontainers.image.authors=For inquiries, please use https://${{ github.repository }}/issues
108- org.opencontainers.image.documentation=https://${{ github.repository }}
109- org.opencontainers.image.vendor=XRPLF
110- org.opencontainers.image.title=${{ env.CONTAINER_REPOSITORY }}-gcc
11196 - name : Build gcc image do not push
11297 if : ${{ matrix.os.release == 'bullseye' }}
98+ id : build-gcc
11399 uses : docker/build-push-action@v6
114100 with :
115101 build-args : |
116102 BUILDKIT_DOCKERFILE_CHECK=skip=InvalidDefaultArgInFrom
117103 BUILDKIT_INLINE_CACHE=1
118104 context : .
119105 file : docker/debian/Dockerfile.gcc-${{ matrix.os.compiler_version }}-${{ matrix.os.release }}
120- outputs : type=image,name=gcc ,push=false
106+ outputs : type=image,name=${{ env.LOCAL_GCC_IMAGE }} ,push=false
121107 platforms : ${{ matrix.architecture.platform }}
122108 provenance : mode=max
123109 push : false
124110 sbom : true
125- labels : ${{ steps.meta-gcc.outputs.labels }}
126- tags : ${{ steps.meta-gcc.outputs.tags }}
111+ tags : ${{ format('{0}:{1}-{2}', env.LOCAL_GCC_IMAGE, matrix.os.compiler_version, matrix.os.release) }}
127112 - name : Prepare container metadata
128113 id : meta
129114 uses : docker/metadata-action@v5
@@ -152,6 +137,7 @@ jobs:
152137 GCOVR_VERSION=${{ env.GCOVR_VERSION }}
153138 CMAKE_VERSION=${{ env.CMAKE_VERSION }}
154139 DEBIAN_VERSION=${{ matrix.os.release }}
140+ BASE_IMAGE=${{ matrix.os.release == 'bullseye' && format('{0}@{1}', env.LOCAL_GCC_IMAGE, steps.build-gcc.outputs.digest) || format('gcc:{0}-{1}', matrix.os.compiler_version, matrix.os.release) }}
155141 context : .
156142 file : docker/debian/Dockerfile
157143 outputs : type=image,name=${{ env.CONTAINER_IMAGE }},push-by-digest=true,name-canonical=true,push=true
0 commit comments