Skip to content

Commit 2185aa9

Browse files
authored
Make the publish workflow push the image the build already produces (#38)
2 parents 231e02b + f01dc30 commit 2185aa9

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

.github/workflows/pub-docker-hub.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ jobs:
1414
username: ${{secrets.DOCKER_USERNAME}}
1515
password: ${{secrets.DOCKER_PASSWORD}}
1616
- uses: actions/checkout@v3
17-
- name: Set up Maven Central Repository
18-
uses: actions/setup-java@v3
17+
- uses: actions/setup-java@v3
1918
with:
2019
java-version: '17'
21-
distribution: 'adopt'
22-
server-id: docker.io
23-
server-username: DOCKER_USERNAME
24-
server-password: DOCKER_PASSWORD
25-
- name: Publish package
26-
run: mvn --batch-mode -Prelease package dockerfile:push
27-
env:
28-
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
29-
DOCKER_TOKEN: ${{secrets.DOCKER_PASSWORD}}
20+
distribution: 'temurin'
21+
cache: 'maven'
22+
# The normal build already produces the image, tagged with the pom
23+
# version, as part of `package`; publishing is just a push.
24+
- name: Build the image
25+
run: mvn --batch-mode -DskipTests package
26+
- name: Push the image
27+
run: |
28+
VERSION=$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)
29+
docker push "protegeproject/webprotege-event-history-service:${VERSION}"

0 commit comments

Comments
 (0)