File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 9393 deploy :
9494 needs : build-and-push
9595 # dev에 머지 전 cd 대상 브랜치 중첩 적용 (release, dev)
96- if : github.event_name == 'push' && (github.ref == 'refs/heads/release' || github.ref == 'refs/heads/dev') && needs.build-and-push.result == 'success'
96+ if : github.event_name == 'push' && (github.ref == 'refs/heads/release' || github.ref == 'refs/heads/dev') &&
97+ (needs.build-and-push.result == 'success')
98+ || (github.event_name == 'workflow_dispatch')
9799 runs-on : ubuntu-latest
100+
98101 steps :
102+ - name : Decide tag
103+ id : tag
104+ run : |
105+ if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.tag }}" ]; then
106+ echo "value=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
107+ else
108+ echo "value=release" >> $GITHUB_OUTPUT
109+ fi
110+
99111 - name : Deploy
100112 uses : appleboy/ssh-action@v1.0.3
101113 with :
@@ -104,5 +116,5 @@ jobs:
104116 key : ${{ secrets.CD_SSH_KEY }}
105117 port : ${{ secrets.CD_PORT }}
106118 script : |
107- export DEPLOY_TAG=release
119+ export DEPLOY_TAG='${{ steps.tag.outputs.value }}'
108120 bash -lc '/srv/docsa/infra/deploy.sh'
You can’t perform that action at this time.
0 commit comments