-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (74 loc) Β· 2.7 KB
/
workflow-dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# 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