Skip to content

Commit 1b86fd8

Browse files
Add workflow to build and push test images
1 parent 4f41edc commit 1b86fd8

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow build and push test images to https://quay.io/repository/opendatahub/distributed-workloads-tests
2+
3+
name: Build and Push test images
4+
on:
5+
push:
6+
branches:
7+
- 'main'
8+
paths:
9+
- 'go.mod'
10+
- 'go.sum'
11+
- 'tests/**'
12+
workflow_dispatch:
13+
14+
jobs:
15+
build-and-push-test-images:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Login to Quay.io
22+
id: podman-login-quay
23+
run: podman login --username ${{ secrets.QUAY_ODH_DW_TESTS_USERNAME }} --password ${{ secrets.QUAY_ODH_DW_TESTS_TOKEN }} quay.io
24+
25+
- name: Build test image
26+
run: make build-test-image
27+
28+
- name: Push test image
29+
run: make push-test-image
30+
31+
- name: Logout from Quay.io
32+
if: always() && steps.podman-login-quay.outcome == 'success'
33+
run: podman logout quay.io

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ verify-imports: openshift-goimports ## Run import verifications.
4141
.PHONY: build-test-image
4242
build-test-image:
4343
podman build -f images/tests/Dockerfile -t ${E2E_TEST_IMAGE} .
44+
45+
.PHONY: push-test-image
46+
push-test-image:
47+
podman push ${E2E_TEST_IMAGE}

0 commit comments

Comments
 (0)