Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 5cabab9

Browse files
authored
Enhance comments and fix Docker tags property
Updated comments for clarity and modified the tags property for Docker image publishing.
1 parent 47c104c commit 5cabab9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/publish-docker.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ jobs:
3434
id: meta
3535
uses: docker/metadata-action@v5
3636
with:
37+
# The image name is defined in pom.xml. This action only generates tags.
3738
images: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
3839
tags: |
39-
# type=schedule
40+
# Generate tags based on the event
4041
type=ref,event=branch
4142
type=ref,event=pr
4243
type=semver,pattern={{version}}
@@ -53,9 +54,9 @@ jobs:
5354
- name: Build and push Docker image
5455
run: |
5556
# The 'spring-boot:build-image' goal uses Paketo Buildpacks to create a Docker image.
56-
# The 'pom.xml' is already configured with the image name.
57-
# We enable publishing and pass the generated tags from the metadata step.
57+
# The 'pom.xml' is already configured with the base image name.
58+
# We pass the generated tags as a comma-separated list to the 'tags' property.
5859
./mvnw spring-boot:build-image \
5960
-DskipTests \
6061
-Dspring-boot.build-image.publish=true \
61-
-Dspring-boot.build-image.imageName=${{ steps.meta.outputs.tags }}
62+
-Dspring-boot.build-image.tags="${{ steps.meta.outputs.tags }}"

0 commit comments

Comments
 (0)