6
6
workflow_dispatch :
7
7
inputs :
8
8
tag :
9
- description : ' Release tag'
9
+ description : ' Release tag (for example: v0.0.0) '
10
10
required : true
11
- default : ' v0.0.0-dev'
12
11
mcad-version :
13
- description : ' Published version of multi-cluster-app-dispatcher to be used as a dependency for InstaScale'
12
+ description : ' Published version of multi-cluster-app-dispatcher to be used as a dependency for InstaScale (for example: v0.0.0) '
14
13
required : true
15
- default : ' v0.0.0-dev'
16
- is-latest :
17
- description : ' Select if the built image should be tagged as latest'
14
+ is-stable :
15
+ description : ' Select if the built image should be tagged as stable'
18
16
required : true
19
17
type : boolean
20
18
quay-organization :
33
31
steps :
34
32
- uses : actions/checkout@v3
35
33
34
+ - name : Verify that release doesn't exist yet
35
+ shell : bash {0}
36
+ run : |
37
+ gh release view ${{ github.event.inputs.tag }}
38
+ status=$?
39
+ if [[ $status -eq 0 ]]; then
40
+ echo "Release ${{ github.event.inputs.tag }} already exists."
41
+ exit 1
42
+ fi
43
+ env :
44
+ GITHUB_TOKEN : ${{ github.TOKEN }}
45
+
36
46
- name : Set up Go
37
47
uses : actions/setup-go@v3
38
48
with :
@@ -59,11 +69,11 @@ jobs:
59
69
run : |
60
70
make image-build -e IMG=quay.io/${{ github.event.inputs.quay-organization }}/instascale-controller:${{ github.event.inputs.tag }}
61
71
make image-push -e IMG=quay.io/${{ github.event.inputs.quay-organization }}/instascale-controller:${{ github.event.inputs.tag }}
62
- - name : Image Push as latest tag
63
- if : ${{ inputs.is-latest }}
72
+ - name : Image Push as stable tag
73
+ if : ${{ inputs.is-stable }}
64
74
run : |
65
- podman tag quay.io/${{ github.event.inputs.quay-organization }}/instascale-controller:${{ github.event.inputs.tag }} quay.io/${{ github.event.inputs.quay-organization }}/instascale-controller:latest
66
- make image-push -e IMG=quay.io/${{ github.event.inputs.quay-organization }}/instascale-controller:latest
75
+ podman tag quay.io/${{ github.event.inputs.quay-organization }}/instascale-controller:${{ github.event.inputs.tag }} quay.io/${{ github.event.inputs.quay-organization }}/instascale-controller:stable
76
+ make image-push -e IMG=quay.io/${{ github.event.inputs.quay-organization }}/instascale-controller:stable
67
77
68
78
# Update dependencies
69
79
- name : Commit go.mod and go.sum changes back to repository
75
85
# Create a release in InstaScale
76
86
- name : Creates a release in GitHub
77
87
run : |
78
- gh release create ${{ github.event.inputs.tag }} --generate-notes
88
+ gh release create ${{ github.event.inputs.tag }} --target ${{ github.ref }} -- generate-notes
79
89
env :
80
90
GITHUB_TOKEN : ${{ github.TOKEN }}
81
91
shell : bash
0 commit comments