-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.16 KB
/
build.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
name: Daybook - BackEnd - CI
on:
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
## gradle caching
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: check
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
# 프로젝트 저장소에 업로드하면 안되는 설정 파일들을 만들어줍니다.
- name: Make application.yml
run: |
# src/main/resources 으로 경로를 이동합니다.
cd ./src/main/resources
# 필요한 yml 파일들을 만들어줍니다.
touch ./application.yml
echo "$APPLICATION" > ./application.yml
env:
APPLICATION: ${{ secrets.APPLICATION }}
shell: bash
- name: Gradle 권한 부여
run: chmod +x gradlew
- name: Gradle로 빌드 실행
run: ./gradlew bootjar