From 8178fda1f62b567c8390b71e465c56f4aee8807c Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Oct 2024 03:39:03 -0400 Subject: [PATCH] Fix GitHub Actions workflow --- .github/workflows/build-and-push.yaml | 30 ++++++++++++--------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml index 5d52509..cda2617 100644 --- a/.github/workflows/build-and-push.yaml +++ b/.github/workflows/build-and-push.yaml @@ -5,32 +5,28 @@ on: branches: - main schedule: - - cron: '20 3 * * 0' # Basically picked at random to try and be a low-load time for GitHub Actions + # Basically picked at random to try and be a low-load time for GitHub Actions + - cron: '20 3 * * 0' workflow_dispatch: jobs: - login: - name: Log in to GitHub Container Registry - runs-on: ubuntu-latest + build_push_images: env: REGISTRY_USER: ${{ github.actor }} REGISTRY_PASSWORD: ${{ github.token }} IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} steps: - - name: Log in to ghcr.io + - name: Log in to GitHub Container Registry uses: redhat-actions/podman-login@v1 with: - username: ${{ env.REGISTRY_USER }} - password: ${{ env.REGISTRY_PASSWORD }} - registry: ${{ env.IMAGE_REGISTRY }} - build_push_images: - name: Build and push container images - runs-on: ubuntu-latest - steps: + username: ${{ github.actor }} + password: ${{ github.token }} + # TODO use {{ github.repository_owner }} when https://github.com/redhat-actions/podman-login/issues/44 is fixed + registry: ghcr.io/seagl - - name: Checkout Repo - uses: actions/checkout@v1 + - name: Checkout Repo + uses: actions/checkout@v1 - - name: Build and push container images - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - run: ./build-and-push.sh 24.04 + - name: Build and push container images + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + run: ./build-and-push.sh 24.04