Skip to content

Commit

Permalink
test: fix job permissions to upload container image to registry
Browse files Browse the repository at this point in the history
  • Loading branch information
ahwayakchih authored Jan 16, 2025
1 parent 7b10ef8 commit bcca140
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/puppeteer-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@ jobs:

build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
attestations: write
id-token: write

env:
REGISTRY: ghcr.io
IMAGE_NAME: puppeteer

steps:
- name: Workaround Windows mess and set git to keep original line endings
run: git config --global core.autocrlf false
Expand All @@ -34,7 +43,7 @@ jobs:

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

- name: Push container image
if: success()
Expand Down

0 comments on commit bcca140

Please sign in to comment.