diff --git a/.github/workflows/api-lottery-ci.yml b/.github/workflows/api-lottery-ci.yml index c2b398b5..9410aafc 100644 --- a/.github/workflows/api-lottery-ci.yml +++ b/.github/workflows/api-lottery-ci.yml @@ -60,11 +60,16 @@ jobs: ls -la lottery/build/generated-snippets/ # 스웨거 소스 업로드 - - name: Upload multiple files as an artifact - uses: actions/upload-artifact@v3 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v3 with: - name: lottery-snippets - path: lottery/build/generated-snippets/* + aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }} + aws-region: 'ap-northeast-2' + + - name: Upload files to S3 + run: | + aws s3 cp lottery/build/generated-snippets/ s3://watermelon-s3-bucket/snippets/ --recursive # 테스트 후 Result를 보기위해 Publish Unit Test Results step 추가 - name: Publish Unit Test Results diff --git a/.github/workflows/api-order-ci.yml b/.github/workflows/api-order-ci.yml index 1cf3096c..eb7b64a7 100644 --- a/.github/workflows/api-order-ci.yml +++ b/.github/workflows/api-order-ci.yml @@ -59,11 +59,16 @@ jobs: ls -la order/build/generated-snippets/ # 스웨거 소스 업로드 - - name: Upload multiple files as an artifact - uses: actions/upload-artifact@v3 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v3 with: - name: order-snippets - path: order/build/generated-snippets/* + aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }} + aws-region: 'ap-northeast-2' + + - name: Upload files to S3 + run: | + aws s3 cp order/build/generated-snippets/ s3://watermelon-s3-bucket/snippets/ --recursive # 테스트 후 Result를 보기위해 Publish Unit Test Results step 추가 - name: Publish Unit Test Results diff --git a/.github/workflows/swagger.yml b/.github/workflows/swagger.yml index d3f94335..0e6f0561 100644 --- a/.github/workflows/swagger.yml +++ b/.github/workflows/swagger.yml @@ -18,27 +18,24 @@ jobs: steps: # 스니펫을 불러온다. - - name: Download multiple files as an artifact - uses: actions/download-artifact@v3 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v3 with: - name: order-snippets - path: order/build/generated-snippets/ + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }} + AWS_REGION: 'ap-northeast-2' # 리전 정보 - - name: Download multiple files as an artifact - uses: actions/download-artifact@v3 - with: - name: lottery-snippets - path: lottery/build/generated-snippets/ + - name: Download files from S3 + run: | + aws s3 cp s3://watermelon-s3-bucket/snippets/ ./merged-api-spec --recursive - name: Verify files downloaded run: | echo "Download Files" - ls -la order/build/generated-snippets/ - ls -la lottery/build/generated-snippets/ + ls -la ./merged-api-spec - name: Generate Swagger Document run: | - ./gradlew mergeApiSpecs ./gradlew openapi3 ./gradlew customGenerateSwaggerUI ls