Skip to content

Commit

Permalink
chore: Github Action 을 통한 CI/CD 구축 테스트 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunmin0317 committed Nov 23, 2024
1 parent 3d1b9a4 commit 14c16b0
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release CI/CD

on:
push:
branches:
- feature/8

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew clean build

- name: Get current time
uses: josStorer/get-current-time@v2.0.2
id: current-time
with:
format: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00"

- name: Set artifact
run: echo "artifact=$(ls ./build/libs)" >> $GITHUB_ENV

# TODO 서비스 운영 시 사용
# - name: Beanstalk Deploy
# uses: einaregilsson/beanstalk-deploy@v20
# with:
# aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# application_name: spring-boot-gpt
# environment_name: spring-boot-gpt-env
# version_label: github-action-${{steps.current-time.outputs.formattedTime}}
# region: ap-northeast-2
# deployment_package: ./build/libs/${{env.artifact}}

0 comments on commit 14c16b0

Please sign in to comment.