Skip to content

Commit

Permalink
ci: try to fix image name
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospereira committed Nov 28, 2023
1 parent 0e060c9 commit 484f7c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.dockerImageMetadata.outputs.tags }}
labels: ${{ steps.dockerImageMetadata.outputs.labels }}
8 changes: 5 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,13 @@ tasks.register("dockerImageNameNative") {
doFirst {
val images = tasks.named<DockerBuildImage>("dockerBuildNative").get().images.get()
val maybeRegistry = registry()
if (maybeRegistry.isPresent) {
println(images.find { it.contains(maybeRegistry.get()) })
val imageName = if (maybeRegistry.isPresent) {
images.find { it.contains(maybeRegistry.get()) }
} else {
println(images.first())
images.first()
}
// No need to show `:latest`, so remove if it is present
println(imageName?.replace(":latest", ""))
}
}
tasks.register("dockerImageName") { dependsOn("dockerImageNameNative") } // This is how Gradle add aliases.
Expand Down

0 comments on commit 484f7c7

Please sign in to comment.