-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.38 KB
/
cd.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
name: cd
on:
push:
branches:
- "develop*"
- "main"
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
token: ${{ secrets.SUBMODULE_GITHUB_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: OpenAPI Spec Create
run: |
export SERVER_NAME=${{ secrets.SERVER_NAME }}
./gradlew test copyDocument
- name: Execute Gradle build
run: |
export SERVER_NAME=${{ secrets.SERVER_NAME }}
export DB_URL=${{ secrets.DB_URL}}
export DB_PASSWORD=${{ secrets.DB_PASSWORD }}
./gradlew jib