-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.26 KB
/
build.yaml
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
name: Build & Unit Test
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set JDK to 17
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
java-package: jdk
architecture: x64
cache: 'gradle'
- name: Set Yaml
uses: microsoft/variable-substitution@v1
with:
files: ./api/src/main/resources/application.yaml
env:
spring.datasource.url: ${{ secrets.DB_URL }}
spring.datasource.username: ${{ secrets.DB_USER_NAME }}
spring.datasource.password: ${{ secrets.DB_USER_PASSWORD }}
oauth.kakao.client-id: ${{ secrets.KAKAO_CLIENT_ID }}
jwt.secret-key: ${{ secrets.SECRET_KEY }}
- name: Build with Gradle
run: |
./gradlew clean build
- name: Docker Image Build
run: docker build -t anwjdrbs123/tag-wonder-api-ci .
- name: Docker Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER_NAME }}
password: ${{ secrets.DOCKER_USER_ACCESS_TOKEN }}
- name: Docker Hub Push
run: docker push anwjdrbs123/tag-wonder-api-ci