File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1
- name : CI Workflow for Build
1
+ name : CI Workflow for Docker Build
2
2
on :
3
3
push :
4
4
jobs :
5
5
endproject :
6
+ env :
7
+ appName : " docker-image"
6
8
runs-on : ubuntu-latest
7
9
steps :
8
10
- name : Checkout
9
11
uses : actions/checkout@v3
12
+ - name : Set up Docker Buildx
13
+ uses : docker/setup-buildx-action@v2
10
14
- name : Set up JDK 11
11
15
uses : actions/setup-java@v3
12
16
with :
15
19
cache : maven
16
20
- name : Build with Maven
17
21
run : mvn -B package --file pom.xml
22
+ - name : Login to Docker Hub
23
+ uses : docker/login-action@v2
24
+ with :
25
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
26
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
27
+ - name : Build and push
28
+ uses : docker/build-push-action@v4
29
+ with :
30
+ context : .
31
+ push : true
32
+ tags : ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.appName }}:latest
You can’t perform that action at this time.
0 commit comments