Skip to content

Commit 239bc49

Browse files
committed
remove packages write permissions
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent d918096 commit 239bc49

4 files changed

Lines changed: 4 additions & 15 deletions

File tree

.github/workflows/.test.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
uses: ./.github/workflows/build.yml
2323
permissions:
2424
contents: read
25-
packages: write
2625
id-token: write
2726
with:
2827
output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
@@ -43,7 +42,6 @@ jobs:
4342
uses: ./.github/workflows/build.yml
4443
permissions:
4544
contents: read
46-
packages: write
4745
id-token: write
4846
with:
4947
output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
@@ -99,8 +97,8 @@ jobs:
9997
uses: ./.github/workflows/build.yml
10098
permissions:
10199
contents: read
102-
packages: write
103100
id-token: write
101+
packages: write
104102
with:
105103
output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
106104
meta-images: ghcr.io/docker/github-builder-test
@@ -119,7 +117,6 @@ jobs:
119117
uses: ./.github/workflows/build.yml
120118
permissions:
121119
contents: read
122-
packages: write
123120
id-token: write
124121
with:
125122
output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
@@ -139,7 +136,6 @@ jobs:
139136
uses: ./.github/workflows/build.yml
140137
permissions:
141138
contents: read
142-
packages: write
143139
id-token: write
144140
with:
145141
output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
@@ -158,8 +154,8 @@ jobs:
158154
uses: ./.github/workflows/build.yml
159155
permissions:
160156
contents: read
161-
packages: write
162157
id-token: write
158+
packages: write
163159
with:
164160
output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
165161
meta-images: |
@@ -183,7 +179,6 @@ jobs:
183179
uses: ./.github/workflows/build.yml
184180
permissions:
185181
contents: read
186-
packages: write
187182
id-token: write
188183
with:
189184
output: ${{ github.event_name != 'pull_request' && 'local' || 'cacheonly' }}
@@ -227,7 +222,6 @@ jobs:
227222
uses: ./.github/workflows/bake.yml
228223
permissions:
229224
contents: read
230-
packages: write
231225
id-token: write
232226
with:
233227
context: test
@@ -283,7 +277,6 @@ jobs:
283277
uses: ./.github/workflows/bake.yml
284278
permissions:
285279
contents: read
286-
packages: write
287280
id-token: write
288281
with:
289282
context: test

.github/workflows/bake.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ jobs:
140140
artifact-name: ${{ inputs.artifact-name }}
141141
permissions:
142142
contents: read
143-
id-token: write # needed for signing the images with GitHub OIDC Token
144-
packages: write # needed to push images to GitHub Container Registry
143+
id-token: write # for signing attestation manifests with GitHub OIDC Token
145144
steps:
146145
-
147146
name: Environment variables

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ jobs:
142142
artifact-name: ${{ inputs.artifact-name }}
143143
permissions:
144144
contents: read
145-
id-token: write # needed for signing the images with GitHub OIDC Token
146-
packages: write # needed to push images to GitHub Container Registry
145+
id-token: write # for signing attestation manifests with GitHub OIDC Token
147146
steps:
148147
-
149148
name: Docker meta

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ on:
3737
permissions:
3838
contents: read
3939
id-token: write # for signing attestation manifests with GitHub OIDC Token
40-
packages: write # only used if pushing to GHCR but needs to be defined as caller must provide permissions ≥ to those used in the reusable workflow
4140
with:
4241
output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
4342
meta-images: name/app
@@ -105,7 +104,6 @@ on:
105104
permissions:
106105
contents: read
107106
id-token: write # for signing attestation manifests with GitHub OIDC Token
108-
packages: write # only used if pushing to GHCR but needs to be defined as caller must provide permissions ≥ to those used in the reusable workflow
109107
with:
110108
output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
111109
meta-images: name/app

0 commit comments

Comments
 (0)