File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 44 types : [published]
55env :
66 IMAGE_NAME : ghcr.io/${{ github.repository }}
7+ IMAGE_NAME_DH : docker.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
78jobs :
89 publish-release :
910 permissions :
2526 registry : ghcr.io
2627 username : ${{ github.actor }}
2728 password : ${{ secrets.GITHUB_TOKEN }}
28- - name : Publish artifact
29+ - name : Login to DockerHub
30+ uses : docker/login-action@v3
31+ with :
32+ username : ${{ secrets.DOCKERHUB_USERNAME }}
33+ password : ${{ secrets.DOCKERHUB_TOKEN }}
34+
35+ - name : Publish artifact and images
2936 env :
3037 ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.SONATYPE_USERNAME }}
3138 ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.SONATYPE_PASSWORD }}
3845 run : |
3946 NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
4047 IMAGE=${IMAGE_NAME}:${NEW_VERSION}
48+ IMAGE_DH=${IMAGE_NAME_DH}:${NEW_VERSION}
4149 echo "Releasing new version ${NEW_VERSION} of $IMAGE"
4250 ./gradlew -Pversion=${NEW_VERSION} publishAllPublicationsToGithubPackagesRepository publishAndReleaseToMavenCentral --no-configuration-cache
43- ./gradlew jib --image="${IMAGE}"
51+ ./gradlew jib --image="${IMAGE}" --image="${IMAGE_DH}"
Original file line number Diff line number Diff line change @@ -207,6 +207,13 @@ jib {
207207 }
208208 image = " cgr.dev/chainguard/jre:latest-dev"
209209 }
210+
211+ to {
212+ // Image tags are set via the CLI (--image=...) in the workflow
213+ // But can set defaults here as well (optional)
214+ tags = setOf (" latest" )
215+ }
216+
210217 container {
211218 ports = listOf (" 8080" )
212219 mainClass = mainClassKt
You can’t perform that action at this time.
0 commit comments