Skip to content
Closed
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
11 changes: 5 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ name: Build container image
on:
pull_request:
push:
branches:
- main
tags:
- '*'

env:
IMAGE_NAME: ${{ github.event.repository.name }}

jobs:
build:
name: Build container image
Expand All @@ -26,14 +25,14 @@ jobs:
id: build_image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ github.event_name == 'pull_request' && github.sha || github.ref_name }}
image: ${{ github.event.repository.name }}
tags: ${{ github.event_name == 'pull_request' && github.sha || (github.ref_name == 'main' && 'latest' || github.ref_name) }}
archs: amd64, arm64, ppc64le, riscv64, s390x
containerfiles: |
./Dockerfile

- name: Push To Registry
if: github.event_name == 'push' && github.ref_type == 'tag'
if: github.event_name == 'push' && (github.ref_type == 'tag' || github.ref_name == 'main')
uses: redhat-actions/push-to-registry@v2
id: push_image
with:
Expand Down