Skip to content

Commit e948802

Browse files
committed
Add workflow to build and push test images for rhoai releases
1 parent 60cc988 commit e948802

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow build and push test images to https://quay.io/repository/opendatahub/distributed-workloads-tests for rhoai release branches
2+
3+
4+
name: Build and Push test images for rhoai releases
5+
on:
6+
push:
7+
branches:
8+
- 'rhoai-*'
9+
paths:
10+
- 'go.mod'
11+
- 'go.sum'
12+
- 'tests/**'
13+
workflow_dispatch:
14+
inputs:
15+
image-tag:
16+
description: 'Image tag to use for the rhoai release which targets the corresponding release branch (E.g: 2.17)'
17+
required: true
18+
19+
jobs:
20+
build-and-push-test-images-for-releases:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Set IMAGE_TAG
27+
run: |
28+
if [ -n "${{ github.event.inputs.image-tag }}" ]; then
29+
echo "IMAGE_TAG=${{ github.event.inputs.image-tag }}" >> $GITHUB_ENV
30+
else
31+
echo "IMAGE_TAG=$(echo ${GITHUB_REF##*/} | sed -E 's/rhoai-([0-9]+\.[0-9]+)/\1/')" >> $GITHUB_ENV
32+
fi
33+
34+
- name: Login to Quay.io
35+
id: podman-login-quay
36+
run: podman login --username ${{ secrets.QUAY_ODH_DW_TESTS_USERNAME }} --password ${{ secrets.QUAY_ODH_DW_TESTS_TOKEN }} quay.io
37+
38+
- name: Build test image
39+
run: make build-test-image E2E_TEST_IMAGE_VERSION=$IMAGE_TAG
40+
41+
- name: Push test image
42+
run: make push-test-image E2E_TEST_IMAGE_VERSION=$IMAGE_TAG
43+
44+
- name: Logout from Quay.io
45+
if: always() && steps.podman-login-quay.outcome == 'success'
46+
run: podman logout quay.io

0 commit comments

Comments
 (0)