@@ -128,6 +128,8 @@ jobs:
128128 permissions :
129129 packages : write
130130 contents : read
131+ outputs :
132+ githash : ${{ steps.git.outputs.githash }}
131133
132134 steps :
133135 - uses : actions/checkout@v4
@@ -226,17 +228,12 @@ jobs:
226228 runs-on : ubuntu-24.04
227229 needs : [deploy-be]
228230 steps :
229- - name : Get service githash
230- id : git
231- run : |
232- hash=$(git rev-list -1 HEAD -- backend)
233- echo "githash=$hash" >> $GITHUB_OUTPUT
234231 - name : Wait stable deployment
235232 run : |
236233 while true; do
237234 response=$(curl -s "https://${{ fromJSON('["pastaporto-", ""]')[github.ref == 'refs/heads/main'] }}admin.pycon.it/health")
238235 commit=$(echo $response | jq -r '.commit')
239- if [ "$commit" == "${{ steps.git .outputs.githash }}" ]; then
236+ if [ "$commit" == "${{ needs.deploy-be .outputs.githash }}" ]; then
240237 echo "New version live"
241238 break
242239 else
@@ -256,7 +253,8 @@ jobs:
256253 permissions :
257254 packages : write
258255 contents : read
259-
256+ outputs :
257+ githash : ${{ steps.git.outputs.githash }}
260258 steps :
261259 - uses : actions/checkout@v4
262260 with :
@@ -374,17 +372,12 @@ jobs:
374372 runs-on : ubuntu-24.04
375373 needs : [deploy-fe]
376374 steps :
377- - name : Get service githash
378- id : git
379- run : |
380- hash=$(git rev-list -1 HEAD -- frontend)
381- echo "githash=$hash" >> $GITHUB_OUTPUT
382375 - name : Wait stable deployment
383376 run : |
384377 while true; do
385378 response=$(curl -s "https://${{ fromJSON('["pastaporto-frontend", "frontend"]')[github.ref == 'refs/heads/main'] }}.pycon.it/api/health")
386379 commit=$(echo $response | jq -r '.commit')
387- if [ "$commit" == "${{ steps.git .outputs.githash }}" ]; then
380+ if [ "$commit" == "${{ needs.deploy-fe .outputs.githash }}" ]; then
388381 echo "New version live"
389382 break
390383 else
0 commit comments