Skip to content

Commit a0365f8

Browse files
Shilpa Chughopenshift-merge-bot[bot]
Shilpa Chugh
authored andcommitted
CARRY: ODH build and publish image
1 parent 4b3b644 commit a0365f8

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This workflow builds ODH Kueue container image and publish to Quay
2+
3+
name: Build and Publish image
4+
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'Tag to be used for kueue image i.e.: v0.0.1'
10+
required: true
11+
push:
12+
tags:
13+
- '*'
14+
15+
jobs:
16+
build-and-publish:
17+
runs-on: ubuntu-latest
18+
env:
19+
GOPATH: ${{ github.workspace }}/go
20+
steps:
21+
- name: Environment dump
22+
shell: bash
23+
run: |
24+
echo "GOPATH = ${GOPATH}"
25+
echo "TAG = ${{ github.event.inputs.version }}"
26+
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Set Go
31+
uses: actions/setup-go@v5
32+
with:
33+
go-version-file: go.mod
34+
35+
- name: Run go mod
36+
shell: bash
37+
run: |
38+
go mod download
39+
40+
- name: Login to Quay.io
41+
id: docker-login-quay
42+
shell: bash
43+
run: |
44+
docker login --username ${{ secrets.QUAY_USERNAME }} --password ${{ secrets.QUAY_PASSWORD }} quay.io
45+
46+
- name: Image Build and Push
47+
env:
48+
CGO_ENABLED: 1
49+
PLATFORMS: linux/amd64
50+
TARGETARCH: amd64
51+
IMAGE_REGISTRY: quay.io/opendatahub
52+
GIT_TAG: ${{ github.event.inputs.version }}
53+
run: |
54+
make image-push
55+
56+
- name: Logout from Quay.io
57+
if: always() && steps.docker-login-quay.outcome == 'success'
58+
run: |
59+
docker logout quay.io

0 commit comments

Comments
 (0)