From 75224e23b2bbcf5cc59e0d69ea85a4c7940d6bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Tue, 4 Jul 2023 11:58:50 +0200 Subject: [PATCH] Fix conditions for publishing the container The workflow isn't run on pushes for main, thus the previous condition didn't make much sense. Instead, we want to push the containers on schedule or when the workflow is run manually. --- .github/workflows/build_containers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_containers.yml b/.github/workflows/build_containers.yml index cc57133..1311a2f 100644 --- a/.github/workflows/build_containers.yml +++ b/.github/workflows/build_containers.yml @@ -57,7 +57,7 @@ jobs: FROM=${{ matrix.distribution.base }} - name: Log in to the Container registry - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} uses: redhat-actions/podman-login@v1 with: registry: ${{ env.REGISTRY }} @@ -65,7 +65,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Push to GitHub Container Repository - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} uses: redhat-actions/push-to-registry@v2 with: image: ${{ env.IMAGE_NAME }}