From 3caf86f202b9f31faca449eeaf2ed20595529329 Mon Sep 17 00:00:00 2001 From: Nadia Santalla Date: Wed, 20 Nov 2024 19:42:00 +0100 Subject: [PATCH] ci: log into ghcr prior to pushing --- .github/workflows/push-pr-release.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/push-pr-release.yaml b/.github/workflows/push-pr-release.yaml index d7e0f9c..0e9efcb 100644 --- a/.github/workflows/push-pr-release.yaml +++ b/.github/workflows/push-pr-release.yaml @@ -8,6 +8,9 @@ on: jobs: build-contianer: + permissions: + contents: read + packages: write name: Build container runs-on: ubuntu-latest steps: @@ -25,6 +28,13 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Log into ghcr.io + if: github.event_name == 'push' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v6 with: