From 2388cc532cb75293e2c837eb760816eee60a3936 Mon Sep 17 00:00:00 2001 From: Na1gae Date: Sun, 31 Aug 2025 17:19:01 +0900 Subject: [PATCH 1/8] =?UTF-8?q?build(infra):=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=EC=98=B5=EC=85=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main_unicon-clec.yml | 43 ++++++++++++-------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/.github/workflows/main_unicon-clec.yml b/.github/workflows/main_unicon-clec.yml index dd48edf..b68858b 100644 --- a/.github/workflows/main_unicon-clec.yml +++ b/.github/workflows/main_unicon-clec.yml @@ -1,4 +1,4 @@ -name: Build and Deploy to Azure App Service +name: Build and Push to AWS ECR Public on: push: @@ -7,12 +7,10 @@ on: workflow_dispatch: env: - ACR_LOGIN_SERVER: ${{ secrets.ACR_LOGIN_SERVER }} - AZURE_WEBAPP_NAME: 'unicon-clec' - IMAGE_NAME: 'unicon-clec' + ECR_REPOSITORY_NAME: 'unicon-clec' jobs: - build: + build-and-push: runs-on: ubuntu-latest steps: @@ -22,30 +20,29 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to Azure Container Registry - uses: docker/login-action@v3 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 with: - registry: ${{ env.ACR_LOGIN_SERVER }} - username: ${{ secrets.ACR_USERNAME }} - password: ${{ secrets.ACR_PASSWORD }} + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + + - name: Log in to Amazon ECR Public + id: login-ecr-public + uses: aws-actions/amazon-ecr-login@v2 + with: + registry-type: public - name: Build and push Docker image + id: build-image uses: docker/build-push-action@v5 with: context: . push: true - tags: ${{ env.ACR_LOGIN_SERVER }}/${{ env.IMAGE_NAME }}:${{ github.sha }} + tags: ${{ steps.login-ecr-public.outputs.registry }}/${{ env.ECR_REPOSITORY_NAME }}:${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max - - deploy: - runs-on: ubuntu-latest - needs: build - - steps: - - name: Deploy to Azure App Service - uses: azure/webapps-deploy@v2 - with: - app-name: ${{ env.AZURE_WEBAPP_NAME }} - publish-profile: ${{ secrets.AZURE_APPSERVICE_PUBLISH_PROFILE }} - images: '${{ env.ACR_LOGIN_SERVER }}/${{ env.IMAGE_NAME }}:${{ github.sha }}' \ No newline at end of file + + - name: Print image URI + run: | + echo "Pushed image URI: ${{ steps.login-ecr-public.outputs.registry }}/${{ env.ECR_REPOSITORY_NAME }}:${{ github.sha }}" \ No newline at end of file From 5cd8bac5cd40e19ff60847e2f739b72515503655 Mon Sep 17 00:00:00 2001 From: Na1gae Date: Sun, 31 Aug 2025 17:25:35 +0900 Subject: [PATCH 2/8] build(infra): Restart Build --- .github/workflows/main_unicon-clec.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main_unicon-clec.yml b/.github/workflows/main_unicon-clec.yml index b68858b..49004ca 100644 --- a/.github/workflows/main_unicon-clec.yml +++ b/.github/workflows/main_unicon-clec.yml @@ -45,4 +45,5 @@ jobs: - name: Print image URI run: | - echo "Pushed image URI: ${{ steps.login-ecr-public.outputs.registry }}/${{ env.ECR_REPOSITORY_NAME }}:${{ github.sha }}" \ No newline at end of file + echo "Pushed image URI: ${{ steps.login-ecr-public.outputs.registry }}/${{ env.ECR_REPOSITORY_NAME }}:${{ github.sha }}" + \ No newline at end of file From a67d2877087acf8f9711a59427cac45fb0929365 Mon Sep 17 00:00:00 2001 From: Na1gae Date: Sun, 31 Aug 2025 17:30:13 +0900 Subject: [PATCH 3/8] =?UTF-8?q?fix:=20=EC=9E=98=EB=AA=BB=EB=90=9C=20ECR=20?= =?UTF-8?q?Repository=20Name=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main_unicon-clec.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main_unicon-clec.yml b/.github/workflows/main_unicon-clec.yml index 49004ca..a1bde4b 100644 --- a/.github/workflows/main_unicon-clec.yml +++ b/.github/workflows/main_unicon-clec.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: env: - ECR_REPOSITORY_NAME: 'unicon-clec' + ECR_REPOSITORY_NAME: 'clec/be' jobs: build-and-push: @@ -46,4 +46,3 @@ jobs: - name: Print image URI run: | echo "Pushed image URI: ${{ steps.login-ecr-public.outputs.registry }}/${{ env.ECR_REPOSITORY_NAME }}:${{ github.sha }}" - \ No newline at end of file From 6caafb1dfdfdd2be9acc73531c79b7de72c2d4b2 Mon Sep 17 00:00:00 2001 From: Na1gae Date: Sun, 31 Aug 2025 18:20:35 +0900 Subject: [PATCH 4/8] =?UTF-8?q?build(infra):=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EB=A1=A4=EB=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main_unicon-clec.yml | 43 ++++++++++++++------------ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main_unicon-clec.yml b/.github/workflows/main_unicon-clec.yml index a1bde4b..dd48edf 100644 --- a/.github/workflows/main_unicon-clec.yml +++ b/.github/workflows/main_unicon-clec.yml @@ -1,4 +1,4 @@ -name: Build and Push to AWS ECR Public +name: Build and Deploy to Azure App Service on: push: @@ -7,10 +7,12 @@ on: workflow_dispatch: env: - ECR_REPOSITORY_NAME: 'clec/be' + ACR_LOGIN_SERVER: ${{ secrets.ACR_LOGIN_SERVER }} + AZURE_WEBAPP_NAME: 'unicon-clec' + IMAGE_NAME: 'unicon-clec' jobs: - build-and-push: + build: runs-on: ubuntu-latest steps: @@ -20,29 +22,30 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 + - name: Log in to Azure Container Registry + uses: docker/login-action@v3 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Log in to Amazon ECR Public - id: login-ecr-public - uses: aws-actions/amazon-ecr-login@v2 - with: - registry-type: public + registry: ${{ env.ACR_LOGIN_SERVER }} + username: ${{ secrets.ACR_USERNAME }} + password: ${{ secrets.ACR_PASSWORD }} - name: Build and push Docker image - id: build-image uses: docker/build-push-action@v5 with: context: . push: true - tags: ${{ steps.login-ecr-public.outputs.registry }}/${{ env.ECR_REPOSITORY_NAME }}:${{ github.sha }} + tags: ${{ env.ACR_LOGIN_SERVER }}/${{ env.IMAGE_NAME }}:${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max - - - name: Print image URI - run: | - echo "Pushed image URI: ${{ steps.login-ecr-public.outputs.registry }}/${{ env.ECR_REPOSITORY_NAME }}:${{ github.sha }}" + + deploy: + runs-on: ubuntu-latest + needs: build + + steps: + - name: Deploy to Azure App Service + uses: azure/webapps-deploy@v2 + with: + app-name: ${{ env.AZURE_WEBAPP_NAME }} + publish-profile: ${{ secrets.AZURE_APPSERVICE_PUBLISH_PROFILE }} + images: '${{ env.ACR_LOGIN_SERVER }}/${{ env.IMAGE_NAME }}:${{ github.sha }}' \ No newline at end of file From ccde72785e76e77259661e25c08bd5ff47bf0abd Mon Sep 17 00:00:00 2001 From: Na1gae Date: Sun, 31 Aug 2025 18:24:15 +0900 Subject: [PATCH 5/8] =?UTF-8?q?build(infra):=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main_unicon-clec.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main_unicon-clec.yml b/.github/workflows/main_unicon-clec.yml index dd48edf..296ab93 100644 --- a/.github/workflows/main_unicon-clec.yml +++ b/.github/workflows/main_unicon-clec.yml @@ -48,4 +48,5 @@ jobs: with: app-name: ${{ env.AZURE_WEBAPP_NAME }} publish-profile: ${{ secrets.AZURE_APPSERVICE_PUBLISH_PROFILE }} - images: '${{ env.ACR_LOGIN_SERVER }}/${{ env.IMAGE_NAME }}:${{ github.sha }}' \ No newline at end of file + images: '${{ env.ACR_LOGIN_SERVER }}/${{ env.IMAGE_NAME }}:${{ github.sha }}' + \ No newline at end of file From 4bdd3913cca8e70b31548af8794f42f6a07e1794 Mon Sep 17 00:00:00 2001 From: Na1gae Date: Sun, 31 Aug 2025 18:31:26 +0900 Subject: [PATCH 6/8] =?UTF-8?q?build(infra):=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main_unicon-clec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main_unicon-clec.yml b/.github/workflows/main_unicon-clec.yml index 296ab93..42ead48 100644 --- a/.github/workflows/main_unicon-clec.yml +++ b/.github/workflows/main_unicon-clec.yml @@ -49,4 +49,4 @@ jobs: app-name: ${{ env.AZURE_WEBAPP_NAME }} publish-profile: ${{ secrets.AZURE_APPSERVICE_PUBLISH_PROFILE }} images: '${{ env.ACR_LOGIN_SERVER }}/${{ env.IMAGE_NAME }}:${{ github.sha }}' - \ No newline at end of file + \ No newline at end of file From 367a3f75b8a3fba6292c2bc3d5911f7773ed2603 Mon Sep 17 00:00:00 2001 From: Na1gae Date: Sun, 31 Aug 2025 18:38:50 +0900 Subject: [PATCH 7/8] =?UTF-8?q?deploy(infra):=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main_unicon-clec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main_unicon-clec.yml b/.github/workflows/main_unicon-clec.yml index 42ead48..0a628cf 100644 --- a/.github/workflows/main_unicon-clec.yml +++ b/.github/workflows/main_unicon-clec.yml @@ -49,4 +49,4 @@ jobs: app-name: ${{ env.AZURE_WEBAPP_NAME }} publish-profile: ${{ secrets.AZURE_APPSERVICE_PUBLISH_PROFILE }} images: '${{ env.ACR_LOGIN_SERVER }}/${{ env.IMAGE_NAME }}:${{ github.sha }}' - \ No newline at end of file + \ No newline at end of file From a7e2984a7b9854da788a6e39f259fd2b3b98e97b Mon Sep 17 00:00:00 2001 From: Na1gae Date: Sun, 31 Aug 2025 19:06:54 +0900 Subject: [PATCH 8/8] =?UTF-8?q?hofix:=20=EC=9E=98=EB=AA=BB=EB=90=9C=20WebA?= =?UTF-8?q?PP=20NAME=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main_unicon-clec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main_unicon-clec.yml b/.github/workflows/main_unicon-clec.yml index 0a628cf..bd92f47 100644 --- a/.github/workflows/main_unicon-clec.yml +++ b/.github/workflows/main_unicon-clec.yml @@ -8,7 +8,7 @@ on: env: ACR_LOGIN_SERVER: ${{ secrets.ACR_LOGIN_SERVER }} - AZURE_WEBAPP_NAME: 'unicon-clec' + AZURE_WEBAPP_NAME: 'clec-be' IMAGE_NAME: 'unicon-clec' jobs: