Skip to content

Commit

Permalink
Integration of pushing Docker image to Dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhorridge committed May 10, 2024
1 parent 5b0016a commit 6ba8def
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/pub-docker-hub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Docker image to Docker Hub
on:
release:
types: [released]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
server-id: docker.io
server-username: DOCKER_USERNAME
server-password: DOCKER_PASSWORD
- name: Publish package
run: mvn --batch-mode -Prelease dockerfile:push
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@
<buildArgs>
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
</configuration>
</plugin>

</plugins>
</build>

Expand Down

0 comments on commit 6ba8def

Please sign in to comment.