Skip to content

Commit

Permalink
Fix conditions for publishing the container
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ondrejbudai committed Jul 4, 2023
1 parent fdf075c commit 75224e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ 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 }}
username: ${{ github.actor }}
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 }}
Expand Down

0 comments on commit 75224e2

Please sign in to comment.