refactor: 304 code 예외 제외, 로깅 순서 변경 #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: stage_CD | |
on: | |
push: | |
branches: | |
- develop | |
paths-ignore: | |
- 'README.md' | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
LAMBDA: stage-resize-image | |
jobs: | |
upload_zip_to_lambda: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Make zip | |
run: | | |
cd src | |
sed -i "s/BUCKET_NAME/${{ secrets.STAGE_BUCKET_NAME }}/gi" index.js | |
docker build --tag sharp_on_lambda:nodejs14 . | |
docker run --name sharp_on_lambda_container sharp_on_lambda:nodejs14 | |
docker cp sharp_on_lambda_container:/lambda.zip . | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: arn:aws:iam::571281437321:role/GitHubActions | |
aws-region: ap-northeast-2 | |
- name: Upload AWS | |
run: | | |
cd src | |
aws lambda update-function-code \ | |
--region us-east-1 \ | |
--function-name ${{ env.LAMBDA }} \ | |
--zip-file fileb://lambda.zip |