Skip to content

Commit

Permalink
Update pub-docker-hub.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhorridge committed May 10, 2024
1 parent 8f9adeb commit 1482798
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/pub-docker-hub.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: Publish Docker image to Docker Hub
on:
release:
types: [released]
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
Expand All @@ -17,7 +23,7 @@ jobs:
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
run: mvn --batch-mode -Prelease package dockerfile:push
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

0 comments on commit 1482798

Please sign in to comment.