@@ -41,12 +41,18 @@ jobs:
41
41
runs-on : ubuntu-latest
42
42
43
43
steps :
44
+ - name : Check if MCAD release does exist
45
+ run : |
46
+ status_code=$(curl -s -o /dev/null -w "%{http_code}" https://github.com/project-codeflare/multi-cluster-app-dispatcher/releases/tag/${{ github.event.inputs.mcad-version }})
47
+ echo "MCAD_RELEASE_STATUS_CODE=$status_code" >> $GITHUB_ENV
48
+
44
49
- name : Release MCAD
45
50
run : |
46
51
gh workflow run mcad-release.yml --repo ${{ github.event.inputs.codeflare-repository-organization }}/multi-cluster-app-dispatcher --ref ${{ github.ref }} --field tag=${{ github.event.inputs.mcad-version }} --field quay-organization=${{ github.event.inputs.quay-organization }}
47
52
env :
48
53
GITHUB_TOKEN : ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
49
54
shell : bash
55
+ if : ${{ env.MCAD_RELEASE_STATUS_CODE != '200' }}
50
56
51
57
- name : Wait for MCAD run to finish
52
58
run : |
@@ -57,18 +63,25 @@ jobs:
57
63
env :
58
64
GITHUB_TOKEN : ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
59
65
shell : bash
66
+ if : ${{ env.MCAD_RELEASE_STATUS_CODE != '200' }}
60
67
61
68
release-instascale :
62
69
needs : release-mcad
63
70
runs-on : ubuntu-latest
64
71
65
72
steps :
73
+ - name : Check if Instascale release does exist
74
+ run : |
75
+ status_code=$(curl -s -o /dev/null -w "%{http_code}" https://github.com/project-codeflare/instascale/releases/tag/${{ github.event.inputs.instascale-version }})
76
+ echo "INSTASCALE_RELEASE_STATUS_CODE=$status_code" >> $GITHUB_ENV
77
+
66
78
- name : Release InstaScale
67
79
run : |
68
80
gh workflow run instascale-release.yml --repo ${{ github.event.inputs.codeflare-repository-organization }}/instascale --ref ${{ github.ref }} --field is-stable=${{ github.event.inputs.is-stable }} --field tag=${{ github.event.inputs.instascale-version }} --field mcad-version=${{ github.event.inputs.mcad-version }} --field quay-organization=${{ github.event.inputs.quay-organization }}
69
81
env :
70
82
GITHUB_TOKEN : ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
71
83
shell : bash
84
+ if : ${{ env.INSTASCALE_RELEASE_STATUS_CODE != '200' }}
72
85
73
86
- name : Wait for InstaScale run to finish
74
87
run : |
@@ -79,11 +92,17 @@ jobs:
79
92
env :
80
93
GITHUB_TOKEN : ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
81
94
shell : bash
95
+ if : ${{ env.INSTASCALE_RELEASE_STATUS_CODE != '200' }}
82
96
83
97
release-codeflare-sdk :
84
98
runs-on : ubuntu-latest
85
99
86
100
steps :
101
+ - name : Check if Codeflare SDK release does exist
102
+ run : |
103
+ status_code=$(curl -s -o /dev/null -w "%{http_code}" https://github.com/project-codeflare/codeflare-sdk/releases/tag/${{ github.event.inputs.codeflare-sdk-version }})
104
+ echo "SDK_RELEASE_STATUS_CODE=$status_code" >> $GITHUB_ENV
105
+
87
106
- name : Release CodeFlare SDK
88
107
run : |
89
108
semver_version="${{ github.event.inputs.codeflare-sdk-version }}"
92
111
env :
93
112
GITHUB_TOKEN : ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
94
113
shell : bash
114
+ if : ${{ env.SDK_RELEASE_STATUS_CODE != '200' }}
95
115
96
116
- name : Wait for CodeFlare SDK run to finish
97
117
run : |
@@ -102,6 +122,7 @@ jobs:
102
122
env :
103
123
GITHUB_TOKEN : ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
104
124
shell : bash
125
+ if : ${{ env.SDK_RELEASE_STATUS_CODE != '200' }}
105
126
106
127
release-codeflare-operator :
107
128
needs : [release-mcad, release-instascale, release-codeflare-sdk]
0 commit comments