refactor: 서비스 코드에 db접근 메서드 생성 #89
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 workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: Java CI with Gradle | |
on: | |
push: | |
branches: [ "main", "develop" ] | |
pull_request: | |
branches: [ "develop" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
## gradle caching | |
- name: Gradle 캐싱 | |
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: Make application.yml | |
run: | | |
cd todo-back | |
cd ./src/main | |
cd ./resources | |
touch ./application.yml | |
touch ./application-runtime.yml | |
touch ./application-oauth.yml | |
touch ./application-jwt.yml | |
echo "$APPLICATION_OAUTH" > ./application-oauth.yml | |
echo "$APPLICATION_JWT" > ./application-jwt.yml | |
echo "$APPLICATION_RUNTIME" > ./application-runtime.yml | |
echo "$APPLICATION" > ./application.yml | |
env: | |
APPLICATION_OAUTH: ${{ secrets.APPLICATION_OAUTH }} | |
APPLICATION_JWT: ${{ secrets.APPLICATION_JWT }} | |
APPLICATION: ${{ secrets.APPLICATION }} | |
APPLICATION_RUNTIME: ${{ secrets.APPLICATION_RUNTIME }} | |
shell: bash | |
- name: Gradle 권한 부여 | |
run: | | |
cd todo-back | |
chmod +x gradlew | |
- name: Gradle로 빌드 실행 | |
run: | | |
cd todo-back | |
./gradlew bootjar | |
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies. | |
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | |
- name: Slack 알람 발송 | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_CHANNEL: general | |
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff' | |
SLACK_ICON: https://github.com/rtCamp.png?size=48 | |
SLACK_MESSAGE: 빌드 결과 => ${{ job.status }} | |
SLACK_TITLE: 빌드 결과 알람 | |
SLACK_USERNAME: Notification-Bot | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
if: always() |