Skip to content

Commit

Permalink
Adding docker push to all the images to automatically add everything …
Browse files Browse the repository at this point in the history
…to docker.io for each build.
  • Loading branch information
krickert committed Aug 18, 2024
1 parent 2857116 commit e17b62f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ jobs:
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
run: ./mvnw -B package deploy --file pom.xml
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: ./mvnw -B -Dpackaging=docker package deploy --file pom.xml
13 changes: 13 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,19 @@
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<configuration>
<to>
<image>docker.io/krickert/${project.name}:${project.version}</image>
<auth>
<username>${env.DOCKER_USERNAME}</username>
<password>${env.DOCKER_PASSWORD}</password>
</auth>
</to>
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit e17b62f

Please sign in to comment.