From e082fb92fda6525c03b3b6866eb050e4c52678d9 Mon Sep 17 00:00:00 2001 From: Freya Gustavsson Date: Fri, 11 Oct 2024 19:59:58 +0200 Subject: [PATCH] chore: Fix workflow ghcr.io authentication --- .github/workflows/build-rpm.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build-rpm.yml b/.github/workflows/build-rpm.yml index dfe82273d8..bbf618bfc7 100644 --- a/.github/workflows/build-rpm.yml +++ b/.github/workflows/build-rpm.yml @@ -14,6 +14,11 @@ on: required: false default: "" +env: + REGISTRY_USER: ${{ github.actor }} + REGISTRY_PASSWORD: ${{ github.token }} + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + jobs: setup_version: name: "Setup Convert2RHEL version" @@ -69,6 +74,13 @@ jobs: with: name: github-repo + - name: Login to ghcr.io + uses: redhat-actions/podman-login@v1 + with: + username: ${{ env.REGISTRY_USER }} + password: ${{ env.REGISTRY_PASSWORD }} + registry: ${{ env.IMAGE_REGISTRY }} + - name: Build RPM package for EL${{ matrix.el.ver }} env: BUILD_IMAGES: false # Building an image is unnecessary