Skip to content

Commit df9dafe

Browse files
committed
ci: add job for testing oidc auth on docker hub
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent 20341fa commit df9dafe

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

.github/workflows/.test.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
meta-images: |
2828
public.ecr.aws/q3b5f1u4/test-docker-action
2929
meta-tags: |
30-
type=raw,value=ghbuilder-${{ github.run_id }}
30+
type=raw,value=ghbuilder-single-${{ github.run_id }}
3131
build-file: test/hello.Dockerfile
3232
build-output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
3333
build-sbom: true
@@ -98,6 +98,25 @@ jobs:
9898
username: ${{ vars.DOCKERHUB_STAGE_USERNAME }}
9999
password: ${{ secrets.DOCKERHUB_STAGE_TOKEN }}
100100
101+
build-dockerhub-stage-oidc:
102+
uses: ./.github/workflows/build.yml
103+
permissions:
104+
contents: read
105+
packages: write
106+
id-token: write
107+
with:
108+
meta-images: registry-1-stage.docker.io/docker/github-builder-test
109+
meta-tags: |
110+
type=raw,value=${{ github.run_id }},prefix=oidc-
111+
build-file: hello.Dockerfile
112+
build-output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
113+
build-sbom: true
114+
build-platforms: linux/amd64,linux/arm64
115+
secrets:
116+
registry-auths: |
117+
- registry: registry-1-stage.docker.io
118+
username: docker:cdeb5882-30b7-4076-be92-bfdceb258e9c
119+
101120
build-ghcr-and-aws:
102121
uses: ./.github/workflows/build.yml
103122
permissions:
@@ -109,7 +128,7 @@ jobs:
109128
ghcr.io/docker/github-builder-test
110129
public.ecr.aws/q3b5f1u4/test-docker-action
111130
meta-tags: |
112-
type=raw,value=${{ github.run_id }}
131+
type=raw,value=${{ github.run_id }},prefix=ghcr-and-aws-
113132
build-file: test/hello.Dockerfile
114133
build-output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
115134
build-sbom: true

0 commit comments

Comments
 (0)