From a642c98ca20e5aa177e38f8b799644e8b5de139f Mon Sep 17 00:00:00 2001 From: Jinsu Park Date: Fri, 24 Dec 2021 18:56:47 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20Github=20Action=20=EC=88=98=ED=96=89=20?= =?UTF-8?q?=EC=8B=9C=20ssm=20parameter=EC=97=90=EC=84=9C=20config=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EA=B0=80=EC=A0=B8=EC=98=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index e6d632c..3e5df2a 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -27,11 +27,18 @@ jobs: mkdir -p rest-api/deploy mkdir -p api-gateway/deploy + - name: Configure AWS credentials from Test account + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ap-northeast-2 + - name: Copy config file run: | - echo '${{ secrets.REST_CONFIG_DEV }}' > rest-api/config/dev.yml - echo '${{ secrets.SERVICE_ACCOUNT_DEV }}' > rest-api/config/service-account-dev.json - echo '${{ secrets.GATEWAY_CONFIG_DEV }}' > api-gateway/config/dev.yml + aws ssm get-parameter --name ${{ secrets.REST_PARAMETER_NAME_DEV }} --query "Parameter.Value" --output text > rest-api/config/dev.yml + aws ssm get-parameter --name ${{ secrets.SERVICE_ACCOUNT_PARAMETER_NAME_DEV }} --query "Parameter.Value" --output text > rest-api/config/service-account-dev.json + aws ssm get-parameter --name ${{ secrets.GATEWAY_PARAMETER_NAME_DEV }} --query "Parameter.Value" --output text > api-gateway/config/dev.yml - name: Build rest-api working-directory: rest-api