From 3a05364e6a6cc9cae728b54495dc473f20961ab4 Mon Sep 17 00:00:00 2001 From: muhsroom1324 Date: Thu, 29 Aug 2024 13:42:44 +0900 Subject: [PATCH] feature: cd test --- .github/workflows/ci.yml | 114 +++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4062e1d..68bf5f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,63 +14,63 @@ permissions: contents: read jobs: - build: - name: CI - runs-on: ubuntu-latest - environment: production - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Make application-secret.yml and set secrets - run: | - mkdir -p ./src/main/resources - mkdir -p ./src/main/resources/key - if [ -f ./src/main/resources/application.yml ]; then - rm ./src/main/resources/application.yml - fi - touch ./src/main/resources/application.yml - touch ./src/main/resources/${{ secrets.APPLE_AUTH_KEY_ID }}.p8 - echo "${{ secrets.APPLICATION_SECRET }}" > ./src/main/resources/application.yml - echo "${{ secrets.APPLE_AUTH_KEY }}" > ./src/main/resources/key/${{ secrets.APPLE_AUTH_KEY_ID }}.p8 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - ## gradle build - - name: Build with Gradle - run: ./gradlew bootJar - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v2 - with: - mask-password: true - - - name: Build, tag, and push image to Amazon ECR - id: build-image - run: | - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY . - docker push $ECR_REGISTRY/$ECR_REPOSITORY - - - name: Zip deployment files - run: | - zip -r ${{ env.ZIP_FILE_NAME }} ./aws/ - - - name: Upload AppSpec and scripts to S3 - run: | - aws s3 cp ${{ env.ZIP_FILE_NAME }} s3://${{ secrets.S3_BUCKET }}/${{ env.ZIP_FILE_NAME }} +# build: +# name: CI +# runs-on: ubuntu-latest +# environment: production +# +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# +# - name: Make application-secret.yml and set secrets +# run: | +# mkdir -p ./src/main/resources +# mkdir -p ./src/main/resources/key +# if [ -f ./src/main/resources/application.yml ]; then +# rm ./src/main/resources/application.yml +# fi +# touch ./src/main/resources/application.yml +# touch ./src/main/resources/${{ secrets.APPLE_AUTH_KEY_ID }}.p8 +# echo "${{ secrets.APPLICATION_SECRET }}" > ./src/main/resources/application.yml +# echo "${{ secrets.APPLE_AUTH_KEY }}" > ./src/main/resources/key/${{ secrets.APPLE_AUTH_KEY_ID }}.p8 +# +# - name: Set up JDK 17 +# uses: actions/setup-java@v4 +# with: +# java-version: '17' +# distribution: 'temurin' +# +# ## gradle build +# - name: Build with Gradle +# run: ./gradlew bootJar +# +# - name: Configure AWS credentials +# uses: aws-actions/configure-aws-credentials@v4 +# with: +# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} +# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# aws-region: ${{ env.AWS_REGION }} +# +# - name: Login to Amazon ECR +# id: login-ecr +# uses: aws-actions/amazon-ecr-login@v2 +# with: +# mask-password: true +# +# - name: Build, tag, and push image to Amazon ECR +# id: build-image +# run: | +# docker build -t $ECR_REGISTRY/$ECR_REPOSITORY . +# docker push $ECR_REGISTRY/$ECR_REPOSITORY +# +# - name: Zip deployment files +# run: | +# zip -r ${{ env.ZIP_FILE_NAME }} ./aws/ +# +# - name: Upload AppSpec and scripts to S3 +# run: | +# aws s3 cp ${{ env.ZIP_FILE_NAME }} s3://${{ secrets.S3_BUCKET }}/${{ env.ZIP_FILE_NAME }} deploy: needs: build