|
| 1 | +name: .test |
| 2 | + |
| 3 | +concurrency: |
| 4 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 5 | + cancel-in-progress: true |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: read |
| 9 | + |
| 10 | +on: |
| 11 | + workflow_dispatch: |
| 12 | + push: |
| 13 | + branches: |
| 14 | + - 'main' |
| 15 | + tags: |
| 16 | + - 'v*' |
| 17 | + pull_request: |
| 18 | + |
| 19 | +jobs: |
| 20 | + build-aws-single: |
| 21 | + uses: .github/workflows/build.yml |
| 22 | + permissions: |
| 23 | + contents: read |
| 24 | + packages: write |
| 25 | + id-token: write |
| 26 | + with: |
| 27 | + meta-images: | |
| 28 | + public.ecr.aws/q3b5f1u4/test-docker-action |
| 29 | + meta-tags: | |
| 30 | + type=raw,value=ghbuilder-${{ github.run_id }} |
| 31 | + build-file: test/hello.Dockerfile |
| 32 | + build-output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }} |
| 33 | + build-sbom: true |
| 34 | + secrets: |
| 35 | + registry-auths: | |
| 36 | + - registry: public.ecr.aws |
| 37 | + username: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 38 | + password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 39 | +
|
| 40 | + build-aws: |
| 41 | + uses: .github/workflows/build.yml |
| 42 | + permissions: |
| 43 | + contents: read |
| 44 | + packages: write |
| 45 | + id-token: write |
| 46 | + with: |
| 47 | + meta-images: | |
| 48 | + public.ecr.aws/q3b5f1u4/test-docker-action |
| 49 | + meta-tags: | |
| 50 | + type=raw,value=ghbuilder-${{ github.run_id }} |
| 51 | + build-file: test/hello.Dockerfile |
| 52 | + build-output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }} |
| 53 | + build-sbom: true |
| 54 | + build-platforms: linux/amd64,linux/arm64 |
| 55 | + secrets: |
| 56 | + registry-auths: | |
| 57 | + - registry: public.ecr.aws |
| 58 | + username: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 59 | + password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 60 | +
|
| 61 | + build-ghcr: |
| 62 | + uses: .github/workflows/build.yml |
| 63 | + permissions: |
| 64 | + contents: read |
| 65 | + packages: write |
| 66 | + id-token: write |
| 67 | + with: |
| 68 | + meta-images: ghcr.io/docker/github-builder-test |
| 69 | + meta-tags: | |
| 70 | + type=raw,value=${{ github.run_id }} |
| 71 | + build-file: test/hello.Dockerfile |
| 72 | + build-output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }} |
| 73 | + build-sbom: true |
| 74 | + build-platforms: linux/amd64,linux/arm64 |
| 75 | + secrets: |
| 76 | + registry-auths: | |
| 77 | + - registry: ghcr.io |
| 78 | + username: ${{ github.actor }} |
| 79 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 80 | +
|
| 81 | + build-dockerhub-stage: |
| 82 | + uses: .github/workflows/build.yml |
| 83 | + permissions: |
| 84 | + contents: read |
| 85 | + packages: write |
| 86 | + id-token: write |
| 87 | + with: |
| 88 | + meta-images: registry-1-stage.docker.io/docker/github-builder-test |
| 89 | + meta-tags: | |
| 90 | + type=raw,value=${{ github.run_id }} |
| 91 | + build-file: test/hello.Dockerfile |
| 92 | + build-output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }} |
| 93 | + build-sbom: true |
| 94 | + build-platforms: linux/amd64,linux/arm64 |
| 95 | + secrets: |
| 96 | + registry-auths: | |
| 97 | + - registry: registry-1-stage.docker.io |
| 98 | + username: ${{ vars.DOCKERHUB_STAGE_USERNAME }} |
| 99 | + password: ${{ secrets.DOCKERHUB_STAGE_TOKEN }} |
| 100 | +
|
| 101 | + build-ghcr-and-aws: |
| 102 | + uses: .github/workflows/build.yml |
| 103 | + permissions: |
| 104 | + contents: read |
| 105 | + packages: write |
| 106 | + id-token: write |
| 107 | + with: |
| 108 | + meta-images: | |
| 109 | + ghcr.io/docker/github-builder-test |
| 110 | + public.ecr.aws/q3b5f1u4/test-docker-action |
| 111 | + meta-tags: | |
| 112 | + type=raw,value=${{ github.run_id }} |
| 113 | + build-file: test/hello.Dockerfile |
| 114 | + build-output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }} |
| 115 | + build-sbom: true |
| 116 | + build-platforms: linux/amd64,linux/arm64 |
| 117 | + secrets: |
| 118 | + registry-auths: | |
| 119 | + - registry: ghcr.io |
| 120 | + username: ${{ github.actor }} |
| 121 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 122 | + - registry: public.ecr.aws |
| 123 | + username: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 124 | + password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 125 | +
|
| 126 | + build-local: |
| 127 | + uses: .github/workflows/build.yml |
| 128 | + permissions: |
| 129 | + contents: read |
| 130 | + packages: write |
| 131 | + id-token: write |
| 132 | + with: |
| 133 | + build-file: test/hello.Dockerfile |
| 134 | + build-output: ${{ github.event_name != 'pull_request' && 'local' || 'cacheonly' }} |
| 135 | + build-sbom: true |
| 136 | + build-platforms: linux/amd64,linux/arm64 |
0 commit comments