diff --git a/.github/workflows/pub-docker-hub.yaml b/.github/workflows/pub-docker-hub.yaml
new file mode 100644
index 0000000..71c11a2
--- /dev/null
+++ b/.github/workflows/pub-docker-hub.yaml
@@ -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}}
diff --git a/pom.xml b/pom.xml
index ac664c2..f9a2679 100644
--- a/pom.xml
+++ b/pom.xml
@@ -114,9 +114,9 @@
${project.build.finalName}.jar
+ true
-