File tree Expand file tree Collapse file tree 2 files changed +32
-8
lines changed Expand file tree Collapse file tree 2 files changed +32
-8
lines changed Original file line number Diff line number Diff line change 3
3
name : Build and Push
4
4
5
5
on :
6
- pull_request :
7
- types :
8
- - closed
6
+ push :
7
+ branches :
8
+ - ' main'
9
+ # paths:
10
+ # - 'config/manager/params.env'
9
11
workflow_dispatch :
10
12
11
13
jobs :
14
+ check-image-existence :
15
+ name : Build and push ODH/CFO image
16
+ runs-on : ubuntu-latest
17
+ outputs :
18
+ image-found : ${{ steps.image.outputs.found }}
19
+ steps :
20
+ - uses : actions/checkout@v4
21
+
22
+ - name : Verify that the latest images are available on Quay
23
+ id : image
24
+ run : |
25
+ imageTag=$(cat config/manager/params.env | grep codeflare-operator-controller-image | cut -d ':' -f2)
26
+ size=$(curl -s https://quay.io/api/v1/repository/project-codeflare/codeflare-operator/tag/?specificTag=$imageTag | jq .tags[0].size)
27
+ if [[ "$size" -eq 0 ]]; then
28
+ echo "Operator image with tag $imageTag not found in Quay.io, will be built."
29
+ echo "found=false" >> "$GITHUB_OUTPUT"
30
+ else
31
+ echo "Operator image with tag $imageTag found in Quay.io"
32
+ fi
33
+
12
34
build-and-push :
13
- if : (github.event.pull_request.merged == true && github.event.pull_request.user.login == 'codeflare-machine-account' && contains(github.event.pull_request.title, 'Sync with Upstream')) || github.event_name == 'workflow_dispatch'
35
+ needs : [check-image-existence]
36
+ if : ${{ needs.check-image-existence.outputs.image-found == 'false' }}
37
+
14
38
name : Build and push ODH/CFO image
15
39
runs-on : ubuntu-latest
16
40
steps :
17
- - uses : actions/checkout@v3
41
+ - uses : actions/checkout@v4
18
42
19
43
- name : Set Go
20
- uses : actions/setup-go@v3
44
+ uses : actions/setup-go@v5
21
45
with :
22
- go-version : v1.20
46
+ go-version-file : ' ./go.mod '
23
47
24
48
- name : Login to Quay.io
25
49
uses : redhat-actions/podman-login@v1
Original file line number Diff line number Diff line change 1
- codeflare-operator-controller-image = quay.io/opendatahub/codeflare-operator:v1.4.0
1
+ codeflare-operator-controller-image = quay.io/opendatahub/codeflare-operator:v1.4.1
2
2
namespace = opendatahub
You can’t perform that action at this time.
0 commit comments