Skip to content

Commit 846594e

Browse files
committed
test: Domain 모듈 수정으로 배포 속도 테스트
1 parent 64c810a commit 846594e

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Dev CI/CD - Parallel Deploy Test
2+
3+
on:
4+
push:
5+
branches:
6+
- test/parallel-deploy # 테스트 브랜치에서만 실행
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: false
11+
12+
env:
13+
REGISTRY: docker.io
14+
IMAGE_PREFIX: ninecraft0523/ninecraft
15+
16+
jobs:
17+
detect-changes:
18+
runs-on: ubuntu-24.04
19+
outputs:
20+
apis: ${{ steps.filter.outputs.apis }}
21+
batch: ${{ steps.filter.outputs.batch }}
22+
any: ${{ steps.filter.outputs.any }}
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Check changed files
28+
uses: dorny/paths-filter@v3
29+
id: filter
30+
with:
31+
filters: |
32+
apis:
33+
- 'apis/**'
34+
- 'domain/**'
35+
- 'infra/**'
36+
- 'global-utils/**'
37+
- 'observability/**'
38+
- '.github/**'
39+
batch:
40+
- 'batch/**'
41+
- 'domain/**'
42+
- 'infra/**'
43+
- 'global-utils/**'
44+
- 'observability/**'
45+
- '.github/**'
46+
any:
47+
- 'apis/**'
48+
- 'batch/**'
49+
- 'domain/**'
50+
- 'infra/**'
51+
- 'global-utils/**'
52+
- 'observability/**'
53+
- '.github/**'
54+
55+
# ========================================
56+
# 병렬 배포: Matrix Strategy 사용
57+
# ========================================
58+
build-push-and-deploy:
59+
needs: detect-changes
60+
if: needs.detect-changes.outputs.any == 'true'
61+
runs-on: ubuntu-24.04
62+
timeout-minutes: 20
63+
environment: development
64+
strategy:
65+
fail-fast: false
66+
matrix:
67+
include:
68+
- module: apis
69+
changed: ${{ needs.detect-changes.outputs.apis }}
70+
- module: batch
71+
changed: ${{ needs.detect-changes.outputs.batch }}
72+
73+
steps:
74+
- name: Checkout code
75+
if: matrix.changed == 'true'
76+
uses: actions/checkout@v4
77+
78+
- name: Deploy module (Parallel)
79+
if: matrix.changed == 'true'
80+
uses: ./.github/actions/deploy-module
81+
with:
82+
environment: dev
83+
module: ${{ matrix.module }}
84+
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
85+
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
86+
secret-properties: ${{ secrets.DEV_SECRET_PROPERTIES }}
87+
apple-auth-key: ${{ secrets.APPLE_AUTH_KEY }}
88+
host: ${{ secrets.DEV_HOST }}
89+
username: ${{ secrets.DEV_USERNAME }}
90+
ssh-key: ${{ secrets.DEV_SSH_KEY }}
91+
ssh-port: ${{ secrets.DEV_PORT }}
92+
discord-webhook-url: ${{ secrets.DEV_DEPLOY_DISCORD_WEBHOOK_URL }}
93+
image-prefix: ${{ env.IMAGE_PREFIX }}
94+
image-tag-type: type=raw,value=development-latest
95+
deploy-script: deploy-dev.sh

0 commit comments

Comments
 (0)