@@ -90,16 +90,67 @@ jobs:
90
90
- name : Load Environment Variables from .env
91
91
uses : xom9ikk/dotenv@v2
92
92
- name : Publish Images
93
+ id : publish
93
94
if :
94
95
needs.check_changesets.outputs.changeset_outputs_hasChangesets ==
95
96
' false'
96
- run : make ${{ matrix.release }}
97
- notify_helm_charts :
98
- name : Notify Helm-Charts Downstream
97
+ run : |
98
+ OUTPUT=$(make ${{ matrix.release }} 2>&1)
99
+ echo "$OUTPUT"
100
+
101
+ # Store the output in a file for the specific release target
102
+ echo "$OUTPUT" > /tmp/${{ matrix.release }}-output.txt
103
+
104
+ # Upload the output as an artifact if this is release-app
105
+ if [ "${{ matrix.release }}" = "release-app" ]; then
106
+ if echo "$OUTPUT" | grep -q "already exists. Skipping push."; then
107
+ echo "RELEASE_APP_PUSHED=false" > /tmp/release-app-status.txt
108
+ else
109
+ echo "RELEASE_APP_PUSHED=true" > /tmp/release-app-status.txt
110
+ fi
111
+ fi
112
+ - name : Upload release-app status
113
+ if : matrix.release == 'release-app'
114
+ uses : actions/upload-artifact@v4
115
+ with :
116
+ name : release-app-status
117
+ path : /tmp/release-app-status.txt
118
+ check_release_app_pushed :
119
+ name : Check if release-app pushed
99
120
needs : [check_changesets, release]
100
121
runs-on : ubuntu-24.04
122
+ outputs :
123
+ app_was_pushed : ${{ steps.check.outputs.pushed }}
101
124
if :
102
125
needs.check_changesets.outputs.changeset_outputs_hasChangesets == 'false'
126
+ steps :
127
+ - name : Download release-app status
128
+ uses : actions/download-artifact@v4
129
+ with :
130
+ name : release-app-status
131
+ path : /tmp
132
+ - name : Check if release-app was pushed
133
+ id : check
134
+ run : |
135
+ if [ -f /tmp/release-app-status.txt ]; then
136
+ STATUS=$(cat /tmp/release-app-status.txt)
137
+ echo "Release app status: $STATUS"
138
+ if [ "$STATUS" = "RELEASE_APP_PUSHED=true" ]; then
139
+ echo "pushed=true" >> $GITHUB_OUTPUT
140
+ else
141
+ echo "pushed=false" >> $GITHUB_OUTPUT
142
+ fi
143
+ else
144
+ echo "No release-app status file found, assuming not pushed"
145
+ echo "pushed=false" >> $GITHUB_OUTPUT
146
+ fi
147
+ notify_helm_charts :
148
+ name : Notify Helm-Charts Downstream
149
+ needs : [check_changesets, release, check_release_app_pushed]
150
+ runs-on : ubuntu-24.04
151
+ if : |
152
+ needs.check_changesets.outputs.changeset_outputs_hasChangesets == 'false' &&
153
+ needs.check_release_app_pushed.outputs.app_was_pushed == 'true'
103
154
steps :
104
155
- name : Checkout
105
156
uses : actions/checkout@v4
@@ -125,10 +176,11 @@ jobs:
125
176
});
126
177
notify_ch :
127
178
name : Notify CH Downstream
128
- needs : [check_changesets, release]
179
+ needs : [check_changesets, release, check_release_app_pushed ]
129
180
runs-on : ubuntu-24.04
130
- if :
131
- needs.check_changesets.outputs.changeset_outputs_hasChangesets == 'false'
181
+ if : |
182
+ needs.check_changesets.outputs.changeset_outputs_hasChangesets == 'false' &&
183
+ needs.check_release_app_pushed.outputs.app_was_pushed == 'true'
132
184
steps :
133
185
- name : Checkout
134
186
uses : actions/checkout@v4
0 commit comments