-
Notifications
You must be signed in to change notification settings - Fork 48
49 lines (41 loc) · 1.08 KB
/
ci.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
name: springboot-bestpractice
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
skipci:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[ci skip]')"
steps:
- run: echo "${{ github.event.head_commit.message }}"
test:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
steps:
- name: 'Set up Java'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: checkout
uses: actions/checkout@v1
- name: unit-test
run: ./gradlew clean test
build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: 'Set up Java'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: checkout
uses: actions/checkout@v1
- name: build
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: sh .github/scripts/build.sh