@@ -161,22 +161,39 @@ jobs:
161161
162162 image :
163163 runs-on : ubuntu-24.04
164+ env :
165+ DEFAULT_BASE : alpine
164166 needs :
165167 - test
166168 strategy :
167169 fail-fast : false
168170 matrix :
169- target :
170- - ' '
171- - rootless
171+ include :
172+ -
173+ base : ' alpine'
174+ -
175+ base : ' alpine'
176+ target : ' rootless'
177+ -
178+ base : ' ubuntu'
179+ build-tag : ' nvidia'
172180 steps :
173181 -
174182 name : Prepare
175183 run : |
184+ tagSuffix=""
176185 if [ -n "${{ matrix.target }}" ]; then
177- echo "TAG_SUFFIX= -${{ matrix.target }}" >> $GITHUB_ENV
186+ tagSuffix="${tagSuffix} -${{ matrix.target }}"
178187 fi
179- if [[ $GITHUB_REF == refs/tags/v* ]]; then
188+ if [ "${{ matrix.base }}" != "$DEFAULT_BASE" ]; then
189+ tagSuffix="${tagSuffix}-${{ matrix.base }}"
190+ fi
191+ if [ -n "${{ matrix.build-tag }}" ]; then
192+ tagSuffix="${tagSuffix}-${{ matrix.build-tag }}"
193+ fi
194+ echo "TAG_SUFFIX=${tagSuffix}" >> $GITHUB_ENV
195+
196+ if [[ $GITHUB_REF == refs/tags/v* ]] && [[ "${{ matrix.base }}" = "$DEFAULT_BASE" ]] && [[ -z "${{ matrix.build-tag }}" ]]; then
180197 if [[ "${GITHUB_REF#refs/tags/}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
181198 if [ -n "${{ matrix.target }}" ]; then
182199 echo "TAG_LATEST=${{ matrix.target }}" >> $GITHUB_ENV
@@ -208,15 +225,19 @@ jobs:
208225 # ## moby/buildkit:latest
209226 # ## moby/buildkit:v0.24.0-rootless
210227 # ## moby/buildkit:rootless
228+ # ## moby/buildkit:v0.24.0-ubuntu-nvidia
211229 # # push semver prerelease tag v0.24.0-rc1
212230 # ## moby/buildkit:v0.24.0-rc1
213231 # ## moby/buildkit:v0.24.0-rc1-rootless
232+ # ## moby/buildkit:v0.24.0-rc1-ubuntu-nvidia
214233 # # push on master
215234 # ## moby/buildkit:master
216235 # ## moby/buildkit:master-rootless
236+ # ## moby/buildkit:master-ubuntu-nvidia
217237 # # scheduled event on master
218238 # ## moby/buildkit:nightly
219239 # ## moby/buildkit:nightly-rootless
240+ # ## moby/buildkit:nightly-ubuntu-nvidia
220241 tags : |
221242 type=schedule,pattern=nightly,suffix=${{ env.TAG_SUFFIX }}
222243 type=ref,event=branch,suffix=${{ env.TAG_SUFFIX }}
@@ -251,11 +272,13 @@ jobs:
251272 provenance : mode=max,version=v1
252273 sbom : true
253274 set : |
254- *.cache-from=type=gha,scope=image${{ matrix.target }}
255- *.cache-to=type=gha,scope=image${{ matrix.target }}
275+ *.cache-from=type=gha,scope=image${{ matrix.target }}-${{ matrix.base }}${{ matrix.build-tag }}
276+ *.cache-to=type=gha,scope=image${{ matrix.target }}-${{ matrix.base }}${{ matrix.build-tag }}
256277 *.no-cache-filter=${{ (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) && 'buildkit-export-alpine,buildkit-export-ubuntu,gobuild-base,rootless' || '' }}
257278 env :
258279 IMAGE_TARGET : ${{ matrix.target }}
280+ EXPORT_BASE : ${{ matrix.base }}
281+ BUILDKITD_TAGS : ${{ matrix.build-tag }}
259282
260283 scout :
261284 runs-on : ubuntu-24.04
0 commit comments