Skip to content

Commit 564f681

Browse files
Rebase PR and confirm IMAGE_NAME removal
Rebased the PR onto the latest main branch. Confirmed that the redundant IMAGE_NAME environment variable has been removed as requested, and the build step now uses the repository name directly from the context. Incorporated latest changes from main.
1 parent a9700c1 commit 564f681

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/build.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Build container image
22
on:
33
pull_request:
44
push:
5+
branches:
6+
- main
57
tags:
68
- '*'
79

@@ -24,13 +26,13 @@ jobs:
2426
uses: redhat-actions/buildah-build@v2
2527
with:
2628
image: ${{ github.event.repository.name }}
27-
tags: ${{ github.event_name == 'pull_request' && github.sha || github.ref_name }}
29+
tags: ${{ github.event_name == 'pull_request' && github.sha || (github.ref_name == 'main' && 'latest' || github.ref_name) }}
2830
archs: amd64, arm64, ppc64le, riscv64, s390x
2931
containerfiles: |
3032
./Dockerfile
3133
3234
- name: Push To Registry
33-
if: github.event_name == 'push' && github.ref_type == 'tag'
35+
if: github.event_name == 'push' && (github.ref_type == 'tag' || github.ref_name == 'main')
3436
uses: redhat-actions/push-to-registry@v2
3537
id: push_image
3638
with:

0 commit comments

Comments
 (0)