Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 126c372

Browse files
committed
added jobs.
1 parent dc9b85f commit 126c372

File tree

1 file changed

+38
-37
lines changed

1 file changed

+38
-37
lines changed

.github/workflows/feature_branch_tests.yml

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,41 @@ on:
88
- 'src/**'
99
- 'pom.xml'
1010

11-
Build_Docker_Image_on_Push:
12-
runs-on: ubuntu-latest
13-
steps:
14-
-
15-
uses: actions/checkout@v1
16-
-
17-
name: Set up JDK
18-
uses: actions/setup-java@v1
19-
with:
20-
java-version: '11.0.8'
21-
architecture: x64
22-
-
23-
name: Run all Tests
24-
run: mvn clean test -f pom.xml
25-
-
26-
name: Upload CodeCov.
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
11+
jobs:
12+
Build_Docker_Image_on_Push:
13+
runs-on: ubuntu-latest
14+
steps:
15+
-
16+
uses: actions/checkout@v1
17+
-
18+
name: Set up JDK
19+
uses: actions/setup-java@v1
20+
with:
21+
java-version: '11.0.8'
22+
architecture: x64
23+
-
24+
name: Run all Tests
25+
run: mvn clean test -f pom.xml
26+
-
27+
name: Upload CodeCov.
28+
run: bash <(curl -s https://codecov.io/bash) -Z
29+
-
30+
name: Build Docker Image
31+
run: mvn spring-boot:build-image -f pom.xml -P prod
32+
-
33+
name: Login to DockerHub
34+
uses: docker/login-action@v1
35+
with:
36+
username: ${{ secrets.DOCKER_USER }}
37+
password: ${{ secrets.DOCKER_PW }}
38+
-
39+
name: Generate Image Tag from Git Branch
40+
id: vars
41+
run: echo ::set-output name=branch::${GITHUB_REF#refs/*/}
42+
-
43+
name: Push Image to DockerHub Registry
44+
run: |
45+
IMAGE_ID=$(docker images rest -q)
46+
VERSION=${{ steps.vars.outputs.branch }}
47+
docker tag $IMAGE_ID filefighter/rest:$VERSION
48+
docker push filefighter/rest:$VERSION

0 commit comments

Comments
 (0)