Skip to content

chore: ci/cd trigger를 위한 주석 추가 #79

chore: ci/cd trigger를 위한 주석 추가

chore: ci/cd trigger를 위한 주석 추가 #79

Workflow file for this run

name: Dev CI/CD - Build, Push and Deploy
on:
push:
branches:
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
REGISTRY: docker.io
IMAGE_PREFIX: ninecraft0523/ninecraft
jobs:
detect-changes:
runs-on: ubuntu-24.04
outputs:
apis: ${{ steps.filter.outputs.apis }}
# admin: ${{ steps.filter.outputs.admin }} # TODO: Uncomment when admin module is ready
batch: ${{ steps.filter.outputs.batch }}
any: ${{ steps.filter.outputs.any }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check changed files
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
apis:
- 'apis/**'
- 'domain/**'
- 'infra/**'
- 'global-utils/**'
- 'observability/**'
# admin: # TODO: Uncomment when admin module is ready
# - 'admin/**'
# - 'domain/**'
# - 'infra/**'
# - 'global-utils/**'
# - 'observability/**'
batch:
- 'batch/**'
- 'domain/**'
- 'infra/**'
- 'global-utils/**'
- 'observability/**'
any:
- 'apis/**'
# - 'admin/**' # TODO: Uncomment when admin module is ready
- 'batch/**'
- 'domain/**'
- 'infra/**'
- 'global-utils/**'
- 'observability/**'
build-push-and-deploy:
needs: detect-changes
if: needs.detect-changes.outputs.any == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 20
environment: development
strategy:
fail-fast: false
matrix:
include:
- module: apis
changed: ${{ needs.detect-changes.outputs.apis }}
# - module: admin # TODO: Uncomment when admin module is ready
# changed: ${{ needs.detect-changes.outputs.admin }}
- module: batch
changed: ${{ needs.detect-changes.outputs.batch }}
steps:
- name: Checkout code
if: matrix.changed == 'true'
uses: actions/checkout@v4
- name: Deploy module
if: matrix.changed == 'true'
uses: ./.github/actions/deploy-module
with:
environment: dev
module: ${{ matrix.module }}
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
secret-properties: ${{ secrets.DEV_SECRET_PROPERTIES }}
apple-auth-key: ${{ secrets.APPLE_AUTH_KEY }}
host: ${{ secrets.DEV_HOST }}
username: ${{ secrets.DEV_USERNAME }}
ssh-key: ${{ secrets.DEV_SSH_KEY }}
ssh-port: ${{ secrets.DEV_PORT }}
discord-webhook-url: ${{ secrets.DEV_DEPLOY_DISCORD_WEBHOOK_URL }}
image-prefix: ${{ env.IMAGE_PREFIX }}
image-tag-type: type=raw,value=development-latest
deploy-script: deploy-dev.sh