Skip to content

Commit

Permalink
Merge pull request #57 from depromeet/cicd
Browse files Browse the repository at this point in the history
feat: Github Action 수행 시 AWS System Manager에서 config 파일 가져옴
  • Loading branch information
umi0410 committed Dec 24, 2021
2 parents 053f580 + a642c98 commit b7d958e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion api-gateway/controller/video.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func DownloadVideo(c echo.Context) error {
if lambdaResCode != http.StatusOK {
msg, _ := ioutil.ReadAll(lambdaResBody)
log.Error("download image failed... code=" + strconv.Itoa(lambdaResCode) + " resp=" + string(msg))
return c.String(http.StatusInternalServerError, string(msg))
return c.String(lambdaResCode, string(msg))
}

// rest에게 받은 응답을 그대로 전달
Expand Down

0 comments on commit b7d958e

Please sign in to comment.