16
16
build :
17
17
name : Maven Build
18
18
runs-on : ubuntu-latest
19
- environment :
20
- name : Build # To isolate BUMP_PAT
21
- url : ${{ steps.upload.outputs.artifact-url }}
19
+ environment : Build # To contain BUMP_PAT within an environment
22
20
outputs :
23
21
artifact_name : app-${{ steps.semver.outputs.nextStrict }}
24
22
new_tag : ${{ steps.semver.outputs.nextStrict }}
@@ -74,15 +72,13 @@ jobs:
74
72
version : ${{ steps.semver.outputs.nextStrict }}
75
73
76
74
- name : Upload JAR Artifact
77
- id : upload
78
75
uses : actions/upload-artifact@v4
79
76
with :
80
77
name : ${{ github.event.repository.name }}-${{ steps.semver.outputs.nextStrict }}
81
78
path : target/*.jar
82
79
if-no-files-found : error
83
80
84
81
- name : Upload Coverage Report Artifact
85
- id : upload
86
82
uses : actions/upload-artifact@v4
87
83
with :
88
84
name : ${{ github.event.repository.name }}-${{ steps.semver.outputs.nextStrict }}-coverage-report
@@ -105,7 +101,7 @@ jobs:
105
101
uses : actions/download-artifact@v4
106
102
with :
107
103
name : ${{ needs.build.outputs.artifact_name }}
108
- path : target/*.jar
104
+ path : target
109
105
110
106
- name : Login to Docker Hub
111
107
uses : docker/login-action@v3
@@ -117,12 +113,16 @@ jobs:
117
113
id : meta
118
114
uses : docker/metadata-action@v3
119
115
with :
120
- images : ${{ inputs.dockerhub_username }}/${{ github.event.repository.name }}
116
+ images : ${{ inputs.image_name }}
117
+ flavor : |
118
+ latest=true
119
+ tags : |
120
+ type=semver,pattern={{version}},value=${{ needs.build.outputs.new_tag }}
121
121
labels : |
122
122
org.opencontainers.image.authors=${{ github.event.repository.owner.html_url }}#group-members
123
123
org.opencontainers.image.title=${{ github.event.repository.name }}
124
124
org.opencontainers.image.description=${{ github.event.repository.description }}
125
- org.opencontainers.image.url=https://hub.docker.com/r/${{ inputs.dockerhub_username }}/${{ github.event.repository.name }}
125
+ org.opencontainers.image.url=https://hub.docker.com/r/${{ inputs.image_name }}
126
126
org.opencontainers.image.documentation=${{ github.event.repository.html_url }}/wiki
127
127
org.opencontainers.image.source=${{ github.event.repository.html_url }}
128
128
org.opencontainers.image.version=${{ needs.build.outputs.new_tag }}
0 commit comments