Skip to content

feat [#37] μŠ€ν¬ν‹°νŒŒμ΄ μ•„ν‹°μŠ€νŠΈ 정보 κ°€μ Έμ˜€λŠ” λͺ¨λ“ˆ κ΅¬ν˜„ #18

feat [#37] μŠ€ν¬ν‹°νŒŒμ΄ μ•„ν‹°μŠ€νŠΈ 정보 κ°€μ Έμ˜€λŠ” λͺ¨λ“ˆ κ΅¬ν˜„

feat [#37] μŠ€ν¬ν‹°νŒŒμ΄ μ•„ν‹°μŠ€νŠΈ 정보 κ°€μ Έμ˜€λŠ” λͺ¨λ“ˆ κ΅¬ν˜„ #18

Workflow file for this run

# 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