Skip to content

Commit d96eff2

Browse files
authored
Update deploy.yaml
1 parent d678d2f commit d96eff2

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

.github/workflows/deploy.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,23 @@ jobs:
2020
startsWith(github.event.workflow_run.head_branch, 'v')
2121
runs-on: ubuntu-latest
2222
timeout-minutes: 15
23+
outputs:
24+
tag: ${{ steps.read-tag.outputs.tag }}
2325

2426
steps:
27+
- name: Download release tag artifact
28+
uses: actions/download-artifact@v4
29+
with:
30+
name: release-tag
31+
path: /tmp/release
32+
github-token: ${{ secrets.GITHUB_TOKEN }}
33+
run-id: ${{ github.event.workflow_run.id }}
34+
35+
- name: Read release tag
36+
id: read-tag
37+
run: |
38+
TAG=$(cat /tmp/release/tag.txt)
39+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
2540
- name: Deploy to node1
2641
uses: appleboy/ssh-action@v1
2742
with:
@@ -32,7 +47,7 @@ jobs:
3247
script: |
3348
set -euo pipefail
3449
cd /opt/voiceban
35-
NODE_IMAGE="ghcr.io/cloud3-foundation/node:${{ github.event.workflow_run.head_branch }}" \
50+
NODE_IMAGE="ghcr.io/cloud3-foundation/node:${{ steps.read-tag.outputs.tag }}" \
3651
bash /opt/cloud/scripts/node/update.sh
3752
3853
- name: Record failure

0 commit comments

Comments
 (0)