#512 K3s API 서버 마이그레이션 및 개발 환경 Kustomization 구성 (#513) #148
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: Change detection and Image tagging with github sha (DEV) | |
| on: | |
| push: | |
| paths-ignore: | |
| - "deployment/**" | |
| - "scripts/**" | |
| - ".github/**" | |
| branches: [develop] | |
| workflow_dispatch: | |
| jobs: | |
| detect-changes-by-component: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| backend: ${{ steps.filter.outputs.backend }} | |
| frontend: ${{ steps.filter.outputs.frontend }} | |
| hub-auth: ${{ steps.filter.outputs.hub-auth }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: dorny/paths-filter@v2 | |
| id: filter | |
| with: | |
| filters: | | |
| backend: | |
| - 'backend/**' | |
| frontend: | |
| - 'frontend/**' | |
| hub-auth: | |
| - 'hub/auth_server/**' | |
| ci-backend-dev: | |
| needs: [detect-changes-by-component] | |
| if: ${{ needs.detect-changes-by-component.outputs.backend == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v1 | |
| - name: Login to Harbor | |
| uses: docker/login-action@v1 | |
| with: | |
| registry: ${{ secrets.HARBOR_REGISTRY }} | |
| username: ${{ secrets.HARBOR_USERNAME }} | |
| password: ${{ secrets.HARBOR_PASSWORD }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: ./backend | |
| file: ./backend/Dockerfile | |
| push: true | |
| tags: | | |
| ${{ secrets.HARBOR_REGISTRY }}/code-place-dev/backend:${{ github.sha }}-dev | |
| ${{ secrets.HARBOR_REGISTRY }}/code-place-dev/backend:latest | |
| ci-frontend-dev: | |
| needs: [detect-changes-by-component] | |
| if: ${{ needs.detect-changes-by-component.outputs.frontend == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v1 | |
| - name: Login to Harbor | |
| uses: docker/login-action@v1 | |
| with: | |
| registry: ${{ secrets.HARBOR_REGISTRY }} | |
| username: ${{ secrets.HARBOR_USERNAME }} | |
| password: ${{ secrets.HARBOR_PASSWORD }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: ./frontend | |
| file: ./frontend/Dockerfile | |
| push: true | |
| tags: | | |
| ${{ secrets.HARBOR_REGISTRY }}/code-place-dev/frontend:${{ github.sha }}-dev | |
| ${{ secrets.HARBOR_REGISTRY }}/code-place-dev/frontend:latest | |
| build-args: | | |
| SERVER_NAME=${{ secrets.DEV_SERVER_NAME }} | |
| APP_VERSION=${{ github.sha }}-dev |