Skip to content

Commit 5ba1a08

Browse files
authored
Merge pull request #7 from pythonkr/fix/deployment-1
fix: 중복된 태그 생성으로 프로덕션 배포가 실패할 수 있는 문제 수정
2 parents 5f99bcc + ee56bf3 commit 5ba1a08

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
env:
2727
API_STAGE: ${{ github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev' }}
28-
BUMP_RULE: ${{ github.event_name == 'workflow_dispatch' && '' || '--stage' }}
28+
BUMP_RULE: ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && '--stage' || '' }}
2929
AWS_ECR_REGISTRY: ${{ github.event_name == 'workflow_dispatch' && secrets.AWS_ECR_PROD_URL || secrets.AWS_ECR_DEV_URL }}
3030

3131
steps:
@@ -62,7 +62,7 @@ jobs:
6262
- name: Get current date, repo name and release tag version
6363
id: info
6464
run: |
65-
LATEST_TAG=$(git tag -l --sort=-version:refname | head -n 1)
65+
LATEST_TAG=$(git tag -l --sort=-creatordate | head -n 1)
6666
echo "::set-output name=TAG::$(python ./.github/scripts/get_new_version.py --current=$LATEST_TAG ${{ env.BUMP_RULE }})"
6767
echo "::set-output name=date::$(date +'%Y-%m-%d_%H:%M:%S')"
6868
echo "::set-output name=repository_name::$(echo ${{ github.repository }} | sed -e 's/${{ github.repository_owner }}\///')"
@@ -139,7 +139,7 @@ jobs:
139139
"type": "header",
140140
"text": {
141141
"type": "plain_text",
142-
"text": "${{ steps.info.outputs.TAG }} 버전 배포 실패 :rotating_light: (${{ job.status }})",
142+
"text": "${{ steps.info.outputs.repository_name }} ${{ steps.info.outputs.TAG }} 버전 배포 실패 :rotating_light: (${{ job.status }})",
143143
"emoji": true
144144
}
145145
},
@@ -171,7 +171,7 @@ jobs:
171171
"type": "header",
172172
"text": {
173173
"type": "plain_text",
174-
"text": "${{ steps.info.outputs.TAG }} 버전 배포 성공 :tada:",
174+
"text": "${{ steps.info.outputs.repository_name }} ${{ steps.info.outputs.TAG }} 버전 배포 성공 :tada:",
175175
"emoji": true
176176
}
177177
},

0 commit comments

Comments
 (0)