We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da781f9 commit 7fd5e40Copy full SHA for 7fd5e40
1 file changed
.github/workflows/docker-image.yml
@@ -0,0 +1,35 @@
1
+name: Docker Image CI
2
+
3
+on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
8
9
+jobs:
10
11
+ build:
12
13
+ runs-on: ubuntu-latest
14
15
+ steps:
16
+ - uses: actions/checkout@v3
17
+ - name: Set up JDK 17
18
+ uses: actions/setup-java@v3
19
+ with:
20
+ java-version: '17'
21
+ distribution: 'temurin'
22
+ cache: maven
23
+ - name: Build with Maven
24
+ run: mvn -B package --file pom.xml
25
+ - name: Login to Docker Hub
26
+ uses: docker/login-action@v3
27
28
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
29
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
30
+ - name: Build and push
31
+ uses: docker/build-push-action@v5
32
33
+ context: .
34
+ push: true
35
+ tags: ${{ secrets.DOCKERHUB_USERNAME }}/anuj-image:latest
0 commit comments