|
16 | 16 | paths: |
17 | 17 | - '.github/workflows/.test-build.yml' |
18 | 18 | - '.github/workflows/build.yml' |
| 19 | + - '.github/workflows/registry-identities.yml' |
19 | 20 | - '.github/workflows/verify.yml' |
20 | 21 | - 'test/**' |
21 | 22 | pull_request: |
22 | 23 | paths: |
23 | 24 | - '.github/workflows/.test-build.yml' |
24 | 25 | - '.github/workflows/build.yml' |
| 26 | + - '.github/workflows/registry-identities.yml' |
25 | 27 | - '.github/workflows/verify.yml' |
26 | 28 | - 'test/**' |
27 | 29 |
|
|
78 | 80 | const builderOutputs = JSON.parse(core.getInput('builder-outputs')); |
79 | 81 | core.info(JSON.stringify(builderOutputs, null, 2)); |
80 | 82 |
|
| 83 | + build-ecr-public: |
| 84 | + uses: ./.github/workflows/build.yml |
| 85 | + if: ${{ github.event_name != 'pull_request' }} |
| 86 | + permissions: |
| 87 | + contents: read |
| 88 | + id-token: write |
| 89 | + with: |
| 90 | + build-args: | |
| 91 | + VERSION={{meta.version}} |
| 92 | + file: test/hello.Dockerfile |
| 93 | + output: image |
| 94 | + push: true |
| 95 | + sbom: true |
| 96 | + registry-identities: | |
| 97 | + - type: aws-ecr |
| 98 | + aws-region: us-east-1 |
| 99 | + role-to-assume: arn:aws:iam::175142243308:role/official_gha_cicd |
| 100 | + registry: public.ecr.aws |
| 101 | + meta-images: | |
| 102 | + public.ecr.aws/q3b5f1u4/test-docker-action |
| 103 | + meta-tags: | |
| 104 | + type=raw,value=build-ecr-public-${{ github.run_id }} |
| 105 | +
|
| 106 | + build-ecr-private: |
| 107 | + uses: ./.github/workflows/build.yml |
| 108 | + if: ${{ github.event_name != 'pull_request' }} |
| 109 | + permissions: |
| 110 | + contents: read |
| 111 | + id-token: write |
| 112 | + with: |
| 113 | + build-args: | |
| 114 | + VERSION={{meta.version}} |
| 115 | + file: test/hello.Dockerfile |
| 116 | + output: image |
| 117 | + push: true |
| 118 | + sbom: true |
| 119 | + registry-identities: | |
| 120 | + - type: aws-ecr |
| 121 | + aws-region: us-east-1 |
| 122 | + role-to-assume: arn:aws:iam::175142243308:role/official_gha_cicd |
| 123 | + registry: 175142243308.dkr.ecr.us-east-2.amazonaws.com |
| 124 | + meta-images: | |
| 125 | + 175142243308.dkr.ecr.us-east-2.amazonaws.com/sandbox/test-docker-action |
| 126 | + meta-tags: | |
| 127 | + type=raw,value=build-ecr-private-${{ github.run_id }} |
| 128 | +
|
81 | 129 | build-dockerhub: |
82 | 130 | uses: ./.github/workflows/build.yml |
83 | 131 | permissions: |
|
0 commit comments