Skip to content

Workflow file for this run

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 -Ddockerfile.username=${{secrets.DOCKER_USERNAME}} -Ddockerfile.password=${{secrets.DOCKER_TOKEN}} package dockerfile:push
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}