-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Github Action gradle.yml 파일 추가
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: [ "develop" ] | ||
pull_request: | ||
branches: [ "develop" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# 기본 체크아웃 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
# Gradlew 실행 허용 | ||
- name: Run chmod to make gradlew executable | ||
run: chmod +x ./gradlew | ||
|
||
# JDK 17 세팅 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
# 환경 변수 설정 | ||
- name: Set environment values | ||
run: | | ||
cd ./src/main/resources | ||
touch ./env.properties | ||
echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" >> ./env.properties | ||
echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> ./env.properties | ||
echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> ./env.properties | ||
echo "JWT_KEY=${{ secrets.JWT_KEY }}" >> ./env.properties | ||
echo "JWT.EXPIRATION.HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" >> ./env.properties | ||
echo "JWT.ISSUER=${{ secrets.JWT_ISSUER }}" >> ./env.properties | ||
shell: bash | ||
|
||
# Gradle build (Test 제외) | ||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
arguments: clean build -x test |