feat [#109] 지난 공연 제외하는 기능 추가 #63
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 |