Skip to content

Commit 12ecce9

Browse files
authored
Update docker-image.yml
1 parent 35f96cb commit 12ecce9

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

.github/workflows/docker-image.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docker Image java
1+
name: Docker Image Java
22

33
on:
44
push:
@@ -7,12 +7,26 @@ on:
77
branches: [ "main" ]
88

99
jobs:
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)

0 commit comments

Comments
 (0)