forked from kookmin-sw/cap-template
-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (41 loc) · 1.14 KB
/
feature.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
name: Build for feature branch
on:
push:
branches:
- feature/*
pull_request:
branches:
- feature/*
permissions:
contents: read
jobs:
build_only:
runs-on: ubuntu-latest # ubuntu 최신 버전에서 script를 실행
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: "adopt"
- name: Make folder resources
run: |
cd ./server/src/main
mkdir resources
cd resources
- name: Make application.properties
run: |
cd ./server/src/main/resources
touch ./application.properties
echo "${{ secrets.PROPERTIES }}" > ./application.properties
# gradle을 통해 소스를 빌드.
- name: Build with Gradle
run: |
cd server
chmod +x ./gradlew
./gradlew clean build -x test
- name: Docker build
run: |
cd server
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -f Dockerfile -t ${{ secrets.DOCKER_REPO }}:latest .