Skip to content

Commit 09a117d

Browse files
ci: update distro container action with smoke test
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
1 parent bc39404 commit 09a117d

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

.github/workflows/redhat-distro-container-build.yml renamed to .github/workflows/redhat-distro-container.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Publish Redhat Distribution Container for Multi-Arch
1+
name: Build, test, and publish Red Hat Distribution Containers
22

33
on:
44
pull_request:
@@ -38,20 +38,38 @@ jobs:
3838
- name: Set up Docker Buildx
3939
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
4040

41+
- name: Build image
42+
id: build
43+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
44+
with:
45+
context: .
46+
file: distribution/Containerfile
47+
platforms: ${{ matrix.platform }}
48+
push: false
49+
tags: ${{ env.IMAGE_NAME }}:${{ github.sha }}
50+
load: true # needed to load for smoke test
51+
52+
- name: Smoke image
53+
id: smoke
54+
run: |
55+
docker run --rm ${{ env.IMAGE_NAME }}:${{ github.sha }}
56+
4157
- name: Log in to Quay.io
58+
id: login
4259
if: github.event_name == 'push'
4360
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
4461
with:
4562
registry: ${{ env.REGISTRY }}
4663
username: ${{ secrets.QUAY_USERNAME }}
4764
password: ${{ secrets.QUAY_PASSWORD }}
4865

49-
- name: Build image and push to quay.io only on push event
50-
id: build
66+
- name: Publish image to Quay.io
67+
id: publish
68+
if: github.event_name == 'push'
5169
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
5270
with:
5371
context: .
5472
file: distribution/Containerfile
5573
platforms: ${{ matrix.platform }}
56-
push: ${{ github.event_name == 'push' }}
74+
push: true
5775
tags: ${{ env.IMAGE_NAME }}:${{ github.sha }},${{ env.IMAGE_NAME }}:latest

0 commit comments

Comments
 (0)