fix(cors): 운영 프론트엔드 도메인 CORS 화이트리스트 추가 #129
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test-and-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Lint | |
| run: yarn lint:check | |
| - name: Unit test | |
| run: yarn test --runInBand --passWithNoTests | |
| - name: Build | |
| run: yarn build | |
| - name: Set image name | |
| id: image | |
| run: | | |
| OWNER="${{ github.repository_owner }}" | |
| echo "tag=ghcr.io/${OWNER,,}/ddd-be:ci" >> "$GITHUB_OUTPUT" | |
| echo "latest=ghcr.io/${OWNER,,}/ddd-be:latest" >> "$GITHUB_OUTPUT" | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker build check | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: false | |
| tags: ${{ steps.image.outputs.tag }} | |
| cache-from: type=registry,ref=${{ steps.image.outputs.latest }} |