Skip to content

Commit 78e0348

Browse files
committed
update permissions
1 parent c52003a commit 78e0348

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/images-pull-request.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on: pull_request
33

44
env:
55
REGISTRY_ALIAS: w0i8p0z9
6+
permissions:
7+
id-token: write
8+
contents: read
9+
610
jobs:
711
# hadolint:
812
# name: Lint Dockerfiles
@@ -36,8 +40,9 @@ jobs:
3640

3741
build-amd64:
3842
name: Build & Push AMD64 Image
39-
runs-on: ubuntu-latest # Ensure it supports x86_64
40-
needs: [ check-modified ]
43+
runs-on: ubuntu-latest # Ensure it supports x86_64
44+
environment: ecr-prod-publish
45+
needs: [check-modified]
4146
strategy:
4247
matrix: ${{ fromJson(needs.check-modified.outputs.dockerfile_dirs) }}
4348
fail-fast: false
@@ -75,8 +80,9 @@ jobs:
7580

7681
build-arm64:
7782
name: Build & Push Arm64 Image
78-
runs-on: ubuntu-24.04-arm # Ensure it supports x86_64
79-
needs: [ check-modified ]
83+
runs-on: ubuntu-24.04-arm # Ensure it supports x86_64
84+
environment: ecr-prod-publish
85+
needs: [check-modified]
8086
strategy:
8187
matrix: ${{ fromJson(needs.check-modified.outputs.dockerfile_dirs) }}
8288
fail-fast: false
@@ -115,6 +121,7 @@ jobs:
115121
create-manifest:
116122
name: Create & Push Multi-Arch Manifest
117123
runs-on: ubuntu-latest
124+
environment: ecr-prod-publish
118125
strategy:
119126
matrix: ${{ fromJson(needs.check-modified.outputs.dockerfile_dirs) }}
120127
fail-fast: false
@@ -140,4 +147,3 @@ jobs:
140147
--amend ${{ steps.login-ecr.outputs.registry }}/${ env.REGISTRY_ALIAS }/${{ matrix.image }}:sha-${{ github.sha }}-arm64
141148
142149
docker manifest push ${{ steps.login-ecr.outputs.registry }}/${ env.REGISTRY_ALIAS }/${{ matrix.image }}:sha-${{ github.sha }}
143-

0 commit comments

Comments
 (0)