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