From 1507b1491bc37459091c2d04df38e55da73aff68 Mon Sep 17 00:00:00 2001 From: Sam Clark <1059176+samhclark@users.noreply.github.com> Date: Sun, 22 Sep 2024 11:27:10 -0500 Subject: [PATCH] Does it work with just podman-login? --- .github/workflows/build.yaml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d1f0abd..d7963e0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -18,8 +18,7 @@ jobs: fail-fast: false steps: - # Checkout push-to-registry action GitHub repository - - name: Checkout Push to Registry action + - name: Checkout repo uses: actions/checkout@v4 # https://github.com/marketplace/actions/cosign-installer @@ -41,8 +40,15 @@ jobs: ${{ github.sha }} 40 oci: false + + - name: Log in to GitHub Container Registry (ghcr.io) + uses: redhat-actions/podman-login@v1 + with: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: ghcr.io/${{ github.repository_owner }} - - name: Push To GHCR + - name: Push To GitHub Container Registry uses: redhat-actions/push-to-registry@v2 id: push if: github.event_name != 'pull_request' @@ -50,18 +56,18 @@ jobs: image: ${{ steps.build_image.outputs.image }} tags: ${{ steps.build_image.outputs.tags }} registry: ghcr.io/${{ github.repository_owner }} - username: ${{ github.actor }} - password: ${{ github.token }} - extra-args: | - --disable-content-trust + # username: ${{ github.actor }} + # password: ${{ github.token }} + # extra-args: | + # --disable-content-trust - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - if: github.event_name != 'pull_request' - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + # - name: Login to GitHub Container Registry + # uses: docker/login-action@v3 + # if: github.event_name != 'pull_request' + # with: + # registry: ghcr.io + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} # - name: Copy Podman login to Docker location for Cosign # if: github.event_name != 'pull_request'