Skip to content

Commit 86a3ed2

Browse files
committed
fix
1 parent bdb7c21 commit 86a3ed2

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)