Skip to content

Commit 07e25a8

Browse files
committed
RHOAIENG-34273: build codeflare-sdk e2e test image
1 parent 1e094f1 commit 07e25a8

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build and Push Test Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
inputs:
9+
E2E_TEST_IMAGE_VERSION:
10+
description: 'Tag for the test image (defaults to latest)'
11+
required: false
12+
default: 'latest'
13+
type: string
14+
BRANCH:
15+
description: 'Branch to build from (defaults to main)'
16+
required: false
17+
default: 'main'
18+
type: string
19+
20+
jobs:
21+
build-and-push:
22+
runs-on: ubuntu-latest
23+
env:
24+
E2E_TEST_IMAGE_VERSION: ${{ github.event.inputs.E2E_TEST_IMAGE_VERSION || 'latest' }}
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v5
28+
with:
29+
ref: ${{ github.event.inputs.BRANCH || 'main' }}
30+
submodules: recursive
31+
32+
- name: Login to Quay.io
33+
id: podman-login-quay
34+
env:
35+
QUAY_USERNAME: ${{ secrets.QUAY_ODH_CODEFLARE_SDK_TESTS_USERNAME }}
36+
QUAY_PASSWORD: ${{ secrets.QUAY_ODH_CODEFLARE_SDK_TESTS_PASSWORD }}
37+
run: |
38+
set -euo pipefail
39+
printf '%s' "$QUAY_PASSWORD" | podman login --username "$QUAY_USERNAME" --password-stdin quay.io
40+
41+
- name: Build test image
42+
run: make build-test-image
43+
44+
- name: Push test image
45+
run: make push-test-image
46+
47+
- name: Logout from Quay.io
48+
if: always() && steps.podman-login-quay.outcome == 'success'
49+
run: podman logout quay.io
50+

0 commit comments

Comments
 (0)