Skip to content

Commit

Permalink
Merge branch 'develop' into feature/#9
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyaak authored Aug 2, 2024
2 parents ed4a902 + fd7c9e2 commit 87cf6f3
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/pr-bot.yml
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 }}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ public void onAuthenticationFailure(HttpServletRequest request, HttpServletRespo
setDefaultFailureUrl(defaultFailureUrl);
super.onAuthenticationFailure(request, response, exception);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ public Collection<? extends GrantedAuthority> getAuthorities() {
public String getName() {
return user.getName();
}
}
}

0 comments on commit 87cf6f3

Please sign in to comment.