feat [#83] νμν μ΄λΈμ λ±λ‘λ νμ€ν°λ², λ μ§ μ‘°ν #59
Workflow file for this run
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
# Workflow μ΄λ¦ | |
name: CI workflow | |
# Event Trigger νκ²½ | |
on: | |
pull_request: | |
branches: [ "develop" ] # pull requestκ° develop λΈλμΉμ μμ±λλ©΄ νΈλ¦¬κ±° | |
permissions: # μν¬νλ‘μ° κΆν | |
contents: read # μ½κΈ° | |
jobs: | |
build: | |
# μ€ννκ²½ μ€μ | |
runs-on: ubuntu-24.04 | |
# Actionμ μ¬μ©νμ¬ Stepμ κ΅¬μ± | |
steps: | |
- name: 체ν¬μμ | |
uses: actions/checkout@v4 # GitHub repository μ½λ 체ν¬μμ | |
# JDK 17 μ€μΉ | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
# resources ν΄λ μμ± | |
- name: Create resources folder if not exist | |
run: | | |
if [ ! -d "./src/main/resources" ]; then | |
mkdir -p ./src/main/resources | |
fi | |
# application.yml νμΌ μμ± | |
- name: make application.yml | |
run: | | |
touch ./src/main/resources/application.yml | |
echo "${{ secrets.APPLICATION_YML }}" > ./src/main/resources/application.yml | |
shell: bash | |
# cloud ν΄λ μμ± | |
- name: Create cloud folder if not exist | |
run: | | |
if [ ! -d "./src/main/resources/cloud" ]; then | |
mkdir -p ./src/main/resources/cloud | |
fi | |
# application-cloud.yml νμΌ μμ± | |
- name: make application-cloud.yml | |
run: | | |
touch ./src/main/resources/cloud/application-cloud.yml | |
echo "${{ secrets.APPLICATION_CLOUD_YML }}" > ./src/main/resources/cloud/application-cloud.yml | |
shell: bash | |
# openapi ν΄λ μμ± | |
- name: Create cloud folder if not exist | |
run: | | |
if [ ! -d "./src/main/resources/openapi" ]; then | |
mkdir -p ./src/main/resources/openapi | |
fi | |
# application-spotify.yml νμΌ μμ± | |
- name: make application-spotify.yml | |
run: | | |
touch ./src/main/resources/openapi/application-spotify.yml | |
echo "${{ secrets.APPLICATION_SPOTIFY_YML }}" > ./src/main/resources/openapi/application-spotify.yml | |
shell: bash | |
# λΉλ μλ ν₯μμ μν Gradle μΊμ± | |
- name: Gradle Caching | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
gradle-${{ runner.os }}- | |
# λΉλλ₯Ό μν κΆν λΆμ¬ | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew # Gradle wrapperμ μ€ν κΆν λΆμ¬ | |
# Gradleμ μ¬μ©νμ¬ λΉλ μ€ν | |
- name: Build with Gradle Wrapper | |
run: ./gradlew clean build -x test |