Skip to content

Commit 00db8c8

Browse files
committed
hotfix: prod CI/CD 워크플로우 수정
1 parent 8b202f4 commit 00db8c8

File tree

2 files changed

+34
-8
lines changed

2 files changed

+34
-8
lines changed

.github/actions/deploy-module/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ inputs:
4949
description: 'Deploy script name (deploy-dev.sh or deploy-prod.sh)'
5050
required: true
5151
default: 'deploy-dev.sh'
52+
release-version:
53+
description: 'Release version tag (e.g., v1.2.3). Only used in production for metadata tracking.'
54+
required: false
55+
default: 'unknown'
5256

5357
runs:
5458
using: 'composite'
@@ -107,6 +111,7 @@ runs:
107111
export MODULE="${{ inputs.module }}"
108112
export SPRING_PROFILE="${{ inputs.environment }}"
109113
export IMAGE_TAG="$(echo "${{ steps.meta.outputs.tags }}" | head -n1)"
114+
export RELEASE_VERSION="${{ inputs.release-version }}"
110115
cd ~/deploy
111116
chmod +x ./${{ inputs.deploy-script }}
112117
./${{ inputs.deploy-script }}

.github/workflows/prod-ci-cd.yml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Prod CI/CD - Build, Push and Deploy
1+
name: Prod CI/CD - Build, Push and Deploy (Sequential with Matrix)
22

33
on:
44
release:
@@ -14,23 +14,21 @@ env:
1414
IMAGE_PREFIX: ninecraft0523/ninecraft
1515

1616
jobs:
17-
build-push-and-deploy:
17+
deploy-modules:
1818
runs-on: ubuntu-24.04
1919
timeout-minutes: 25
2020
environment: production
2121
strategy:
22-
fail-fast: false
22+
max-parallel: 1
23+
fail-fast: true
2324
matrix:
24-
include:
25-
- module: apis
26-
# - module: admin # TODO: Uncomment when admin module is ready
27-
- module: batch
25+
module: [apis, batch] # 배포 순서: apis → batch (배열 순서대로 실행)
2826

2927
steps:
3028
- name: Checkout code
3129
uses: actions/checkout@v4
3230

33-
- name: Deploy module
31+
- name: Deploy ${{ matrix.module }} module
3432
uses: ./.github/actions/deploy-module
3533
with:
3634
environment: prod
@@ -49,3 +47,26 @@ jobs:
4947
type=semver,pattern={{version}}
5048
type=raw,value=production-latest
5149
deploy-script: deploy-prod.sh
50+
release-version: ${{ github.event.release.tag_name }}
51+
52+
deployment-summary:
53+
runs-on: ubuntu-24.04
54+
needs: deploy-modules
55+
if: always()
56+
57+
steps:
58+
- name: Send deployment summary to Discord
59+
uses: tsickert/discord-webhook@b217a69502f52803de774ded2b1ab7c282e99645
60+
continue-on-error: true
61+
with:
62+
webhook-url: ${{ secrets.PROD_DEPLOY_DISCORD_WEBHOOK_URL }}
63+
content: "📊 **Production Deployment Summary**"
64+
embed-title: "[${{ github.repository }}] Production Deployment Completed"
65+
embed-description: |
66+
**Release**: `${{ github.event.release.tag_name }}`
67+
**Status**: ${{ needs.deploy-modules.result == 'success' && '✅ All modules deployed successfully' || '❌ Deployment failed' }}
68+
**Deployed by**: `${{ github.actor }}`
69+
70+
[View Release](${{ github.event.release.html_url }})
71+
[View Workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
72+
embed-color: ${{ needs.deploy-modules.result == 'success' && '65280' || '16711680' }}

0 commit comments

Comments
 (0)