Skip to content

Commit

Permalink
feat: Artifact S3 업로드
Browse files Browse the repository at this point in the history
  • Loading branch information
BinarySstar authored Nov 22, 2024
1 parent c91433d commit 80abfb6
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ "master" ]

env:
S3_BUCKET_NAME: kongju-s3-bucket
AWS_REGION: ap-northeast-2

jobs:
build:

Expand All @@ -29,5 +33,18 @@ jobs:
run: ./gradlew build
shell: bash


#$GITHUB_SHA : Github Actions에서 제공하는 여러 기본 환경변수 중 하나이며, 현재 workflow를 실행시키는 커밋의 해쉬값
- name: Make zip file
run: zip -r ./$GITHUB_SHA.zip .
shell: bash

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Upload to S3
run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/$GITHUB_SHA.zip

0 comments on commit 80abfb6

Please sign in to comment.