Skip to content

v1.1.0

v1.1.0 #3

Workflow file for this run

name: Prod CI/CD - Build, Push and Deploy (Sequential with Matrix)
on:
release:
types:
- published # GitHub Release가 'published' 상태일 때만 워크플로우를 실행합니다.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
REGISTRY: docker.io
IMAGE_PREFIX: ninecraft0523/ninecraft
jobs:
deploy-modules:
runs-on: ubuntu-24.04
timeout-minutes: 25
environment: production
strategy:
max-parallel: 1
fail-fast: true
matrix:
module: [apis, batch] # 배포 순서: apis → batch (배열 순서대로 실행)
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy ${{ matrix.module }} module
uses: ./.github/actions/deploy-module
with:
environment: prod
module: ${{ matrix.module }}
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
secret-properties: ${{ secrets.PROD_SECRET_PROPERTIES }}
apple-auth-key: ${{ secrets.APPLE_AUTH_KEY }}
host: ${{ secrets.PROD_HOST }}
username: ${{ secrets.PROD_USERNAME }}
ssh-key: ${{ secrets.PROD_SSH_KEY }}
ssh-port: ${{ secrets.PROD_PORT }}
discord-webhook-url: ${{ secrets.PROD_DEPLOY_DISCORD_WEBHOOK_URL }}
image-prefix: ${{ env.IMAGE_PREFIX }}
image-tag-type: |
type=semver,pattern={{version}}
type=raw,value=production-latest
deploy-script: deploy-prod.sh
release-version: ${{ github.event.release.tag_name }}
deployment-summary:
runs-on: ubuntu-24.04
needs: deploy-modules
if: always()
steps:
- name: Send deployment summary to Discord
uses: tsickert/discord-webhook@b217a69502f52803de774ded2b1ab7c282e99645
continue-on-error: true
with:
webhook-url: ${{ secrets.PROD_DEPLOY_DISCORD_WEBHOOK_URL }}
content: "📊 **Production Deployment Summary**"
embed-title: "[${{ github.repository }}] Production Deployment Completed"
embed-description: |
**Release**: `${{ github.event.release.tag_name }}`
**Status**: ${{ needs.deploy-modules.result == 'success' && '✅ All modules deployed successfully' || '❌ Deployment failed' }}
**Deployed by**: `${{ github.actor }}`
[View Release](${{ github.event.release.html_url }})
[View Workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
embed-color: ${{ needs.deploy-modules.result == 'success' && '65280' || '16711680' }}