Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: run build workflow on the merge queue #10

Merged
merged 3 commits into from
Nov 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ on:
paths-ignore:
- "README.md"
workflow_dispatch:
schedule:
- cron: '35 4 * * *'
# for merge queue
merge_group:
push:
branches: [main]

env:
REGISTRY: ghcr.io
Expand All @@ -32,15 +34,15 @@ jobs:
containerfiles: Containerfile

- name: Log in to the Container registry
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && github.ref == 'refs/heads/main' }}
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 == 'workflow_dispatch' || github.event_name == 'schedule' }}
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && github.ref == 'refs/heads/main' }}
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ env.IMAGE_NAME }}
Expand Down