-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/#9
- Loading branch information
Showing
3 changed files
with
71 additions
and
2 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,69 @@ | ||
name: Java Spring Build Checker | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'server/src/**' | ||
- 'server/build.gradle' | ||
branches: | ||
- develop | ||
workflow_dispatch: | ||
inputs: | ||
comment: | ||
description: '수동 trigger 사유' | ||
default: 'ex) 서버 설정 변경 등' | ||
|
||
permissions: | ||
checks: write | ||
pull-requests: write | ||
|
||
jobs: | ||
build: | ||
name: Build check | ||
runs-on: ubuntu-latest | ||
env: | ||
working-directory: server | ||
steps: | ||
- name: Checkout the code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'corretto' | ||
cache: 'gradle' | ||
|
||
- name: Setup MySQL | ||
uses: mirromutth/[email protected] | ||
with: | ||
mysql database: 'talkka_db' | ||
mysql user: ${{ secrets.MYSQL_USERNAME }} | ||
mysql password: ${{ secrets.MYSQL_PASSWORD }} | ||
|
||
- name: Make application.yaml | ||
run: | | ||
cd ./src/main/resources | ||
touch ./application.yaml | ||
echo "${{ secrets.APPLICATION_YAML }}" >> ./application.yaml | ||
shell: bash | ||
working-directory: ${{ env.working-directory }} | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
working-directory: ${{ env.working-directory }} | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew clean build --debug --exclude-task test | ||
working-directory: ${{ env.working-directory }} |
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
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