@@ -223,6 +223,18 @@ jobs:
223223 await exec.exec(cmd);
224224 }
225225
226+ build-local-single :
227+ uses : ./.github/workflows/build.yml
228+ permissions :
229+ contents : read
230+ packages : write
231+ id-token : write
232+ with :
233+ output : ${{ github.event_name != 'pull_request' && 'local' || 'cacheonly' }}
234+ artifact-name : build-output-single
235+ build-file : test/hello.Dockerfile
236+ build-sbom : true
237+
226238 bake-aws :
227239 uses : ./.github/workflows/bake.yml
228240 permissions :
@@ -279,6 +291,66 @@ jobs:
279291 await exec.exec(cmd);
280292 }
281293
294+ bake-ghcr-and-aws :
295+ uses : ./.github/workflows/bake.yml
296+ permissions :
297+ contents : read
298+ packages : write
299+ id-token : write
300+ with :
301+ context : test
302+ target : hello-cross
303+ output : ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
304+ cache : true
305+ cache-scope : bake-aws
306+ meta-images : |
307+ ghcr.io/docker/github-builder-test
308+ public.ecr.aws/q3b5f1u4/test-docker-action
309+ meta-tags : |
310+ type=raw,value=${{ github.run_id }},prefix=bake-ghcr-and-aws-
311+ bake-sbom : true
312+ secrets :
313+ registry-auths : |
314+ - registry: ghcr.io
315+ username: ${{ github.actor }}
316+ password: ${{ secrets.GITHUB_TOKEN }}
317+ - registry: public.ecr.aws
318+ username: ${{ secrets.AWS_ACCESS_KEY_ID }}
319+ password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
320+
321+ bake-ghcr-and-aws-verify :
322+ runs-on : ubuntu-latest
323+ if : ${{ github.event_name != 'pull_request' }}
324+ needs :
325+ - bake-ghcr-and-aws
326+ steps :
327+ -
328+ name : Install Cosign
329+ uses : sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
330+ with :
331+ cosign-release : ${{ needs.bake-ghcr-and-aws.outputs.cosign-version }}
332+ -
333+ name : Login to registry
334+ uses : docker/login-action@v3
335+ with :
336+ registry : public.ecr.aws
337+ username : ${{ secrets.AWS_ACCESS_KEY_ID }}
338+ password : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
339+ -
340+ name : Verify signatures
341+ uses : actions/github-script@v8
342+ env :
343+ INPUT_COSIGN-VERSION : ${{ needs.bake-ghcr-and-aws.outputs.cosign-version }}
344+ INPUT_COSIGN-VERIFY-COMMANDS : ${{ needs.bake-ghcr-and-aws.outputs.cosign-verify-commands }}
345+ with :
346+ script : |
347+ const cosignVersion = core.getInput('cosign-version');
348+ core.info(`Cosign version used by Docker GitHub Builder: ${cosignVersion}`);
349+ const cosignVerifyCommands = core.getMultilineInput('cosign-verify-commands');
350+ for (const cmd of cosignVerifyCommands) {
351+ await exec.exec(cmd);
352+ }
353+
282354 bake-local :
283355 uses : ./.github/workflows/bake.yml
284356 permissions :
@@ -323,3 +395,17 @@ jobs:
323395 for (const cmd of cosignVerifyCommands) {
324396 await exec.exec(cmd);
325397 }
398+
399+ bake-local-single :
400+ uses : ./.github/workflows/bake.yml
401+ permissions :
402+ contents : read
403+ packages : write
404+ id-token : write
405+ with :
406+ context : test
407+ target : hello
408+ output : ${{ github.event_name != 'pull_request' && 'local' || 'cacheonly' }}
409+ cache : true
410+ artifact-name : bake-output-single
411+ bake-sbom : true
0 commit comments