Skip to content

Commit bcca140

Browse files
authored
test: fix job permissions to upload container image to registry
1 parent 7b10ef8 commit bcca140

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/puppeteer-container.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,17 @@ jobs:
99

1010
build:
1111
runs-on: ubuntu-latest
12+
13+
permissions:
14+
contents: read
15+
packages: write
16+
attestations: write
17+
id-token: write
18+
1219
env:
20+
REGISTRY: ghcr.io
1321
IMAGE_NAME: puppeteer
22+
1423
steps:
1524
- name: Workaround Windows mess and set git to keep original line endings
1625
run: git config --global core.autocrlf false
@@ -34,7 +43,7 @@ jobs:
3443

3544
- name: Login in to registry
3645
if: success()
37-
run: echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io -u ${{ github.actor }} --password-stdin
46+
run: echo "${{ secrets.GITHUB_TOKEN }}" | podman login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
3847

3948
- name: Push container image
4049
if: success()

0 commit comments

Comments
 (0)