From 3d264c3318d5c7bfce3d9f94459ab10fcfc73a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=86=A1=EC=98=81=EB=AF=BC?= Date: Sun, 14 Jul 2024 00:24:41 +0900 Subject: [PATCH] chore: update missing cicd configs --- .github/workflows/api-gateway.yaml | 8 ++++++-- .github/workflows/argocd-deploy.yaml | 2 +- .github/workflows/jib-build.yaml | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/api-gateway.yaml b/.github/workflows/api-gateway.yaml index b192cab..56acb7e 100644 --- a/.github/workflows/api-gateway.yaml +++ b/.github/workflows/api-gateway.yaml @@ -4,12 +4,14 @@ on: branches: [ 'main' ] paths: - 'api-gateway/**' # API Gateway 모듈 변경 + - '.github/workflows/api-gateway.yaml' # API Gateway 워크플로우 변경 env: SPRING_PROFILE: prod IMAGE_NAME: spinachpasta/api-gateway MODULE_PATH: api-gateway SERVER_PORT: 8080 + GIT_ENVIRONMENT: prod (api-gateway) concurrency: group: api-gateway @@ -24,6 +26,7 @@ jobs: spring-profile: ${{ steps.setup-env.outputs.spring-profile }} server-port: ${{ steps.setup-env.outputs.server-port }} image-name: ${{ steps.setup-env.outputs.image-name }} + git-environment: ${{ steps.setup-env.outputs.git-environment }} steps: - name: GitHub 에서 레포 받아오기 uses: actions/checkout@v3 @@ -36,6 +39,7 @@ jobs: echo "spring-profile=$SPRING_PROFILE" >> $GITHUB_OUTPUT echo "server-port=$SERVER_PORT" >> $GITHUB_OUTPUT echo "image-name=$IMAGE_NAME" >> $GITHUB_OUTPUT + echo "git-environment=$GIT_ENVIRONMENT" >> $GITHUB_OUTPUT call-build-workflow: if: github.event_name == 'push' @@ -65,8 +69,8 @@ jobs: argocd-repo-name: YAPP-Github/mafoo-argocd-manifest overlay-name: ${{ needs.prepare-variables.outputs.spring-profile }} service-name: ${{ needs.prepare-variables.outputs.module-path }} - image-name: spinachpasta/api-gateway + image-name: ${{ needs.prepare-variables.outputs.image-name }} image-tag: ${{ needs.prepare-variables.outputs.image-tag }} - environment: ${{ needs.prepare-variables.outputs.spring-profile }} + environment: ${{ needs.prepare-variables.outputs.git-environment }} secrets: PAT_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/argocd-deploy.yaml b/.github/workflows/argocd-deploy.yaml index 8ab0a9a..c88ada1 100644 --- a/.github/workflows/argocd-deploy.yaml +++ b/.github/workflows/argocd-deploy.yaml @@ -48,5 +48,5 @@ jobs: cat kustomization.yaml git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git commit -am "deploy(${{ inputs.service-name }}): 자동배포 ${{ inputs.image-name }}" + git commit -am "release(${{ inputs.service-name }}): 자동배포 ${{ inputs.image-name }}:${{ inputs.image-tag }}" git push -u origin main diff --git a/.github/workflows/jib-build.yaml b/.github/workflows/jib-build.yaml index a435cf3..70e2704 100644 --- a/.github/workflows/jib-build.yaml +++ b/.github/workflows/jib-build.yaml @@ -49,7 +49,7 @@ jobs: distribution: 'temurin' - name: Gradle 준비하기 - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 - name: 이미지 빌드하고 푸쉬하기 id: build-image