File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed
Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change 1- name : Docker Image java
1+ name : Docker Image Java
22
33on :
44 push :
77 branches : [ "main" ]
88
99jobs :
10-
1110 build :
12-
1311 runs-on : ubuntu-latest
1412
1513 steps :
16- - uses : actions/checkout@v4
17- - name : Build the Docker image
18- run : docker build . --file Dockerfile --tag javafile:$(date +%s)
14+ - name : Checkout repository
15+ uses : actions/checkout@v4
16+ - name : Build the Docker image
17+ run : docker build . --file Dockerfile --tag javafile:$(date +%s)
18+ - name : Set up Docker Buildx
19+ uses : docker/setup-buildx-action@v3
20+
21+ - name : Log in to Docker Hub
22+ uses : docker/login-action@v3
23+ with :
24+ username : ${{ secrets.DOCKER_USERNAME }}
25+ password : ${{ secrets.DOCKER_PASSWORD }}
26+
27+ - name : Build and push Docker image
28+ uses : docker/build-push-action@v5
29+ with :
30+ context : .
31+ push : true
32+ tags : manojkumar8008/javafile:$(date +%s)
You can’t perform that action at this time.
0 commit comments