This repository was archived by the owner on Apr 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +33
-13
lines changed Expand file tree Collapse file tree 1 file changed +33
-13
lines changed Original file line number Diff line number Diff line change 1
- name : Run all Tests on Feature Branches
1
+ name : Feature Branch Release
2
2
3
3
on :
4
4
push :
5
- branches :
6
- - ' !master'
7
- - ' feature/**'
5
+ branches :
6
+ - ' feature/**'
7
+ paths :
8
+ - ' src/**'
9
+ - ' pom.xml'
8
10
9
- jobs :
10
- Run-All-Tests :
11
+ Build_Docker_Image_on_Push :
11
12
runs-on : ubuntu-latest
12
-
13
13
steps :
14
- -
15
- uses : actions/checkout@v1
16
- -
14
+ -
15
+ uses : actions/checkout@v1
16
+ -
17
17
name : Set up JDK
18
18
uses : actions/setup-java@v1
19
19
with :
20
20
java-version : ' 11.0.8'
21
21
architecture : x64
22
22
-
23
- name : Run all Tests
24
- run : mvn clean test -f pom.xml
25
- -
23
+ name : Run all Tests
24
+ run : mvn clean test -f pom.xml
25
+ -
26
26
name : Upload CodeCov.
27
27
run : bash <(curl -s https://codecov.io/bash) -Z
28
+ -
29
+ name : Build Docker Image
30
+ run : mvn spring-boot:build-image -f pom.xml -P prod
31
+ -
32
+ name : Login to DockerHub
33
+ uses : docker/login-action@v1
34
+ with :
35
+ username : ${{ secrets.DOCKER_USER }}
36
+ password : ${{ secrets.DOCKER_PW }}
37
+ -
38
+ name : Generate Image Tag from Git Branch
39
+ id : vars
40
+ run : echo ::set-output name=branch::${GITHUB_REF#refs/*/}
41
+ -
42
+ name : Push Image to DockerHub Registry
43
+ run : |
44
+ IMAGE_ID=$(docker images rest -q)
45
+ VERSION=${{ steps.vars.outputs.branch }}
46
+ docker tag $IMAGE_ID filefighter/rest:$VERSION
47
+ docker push filefighter/rest:$VERSION
You can’t perform that action at this time.
0 commit comments