Skip to content

Commit

Permalink
build: change copyDockerfile output path (#1458)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndr-brt authored Jul 24, 2024
1 parent 8a5aa9d commit 2956ac8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/actions/publish-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ runs:
uses: docker/build-push-action@v3
with:
context: .
file: ${{ inputs.rootDir }}/build/Dockerfile
file: ${{ inputs.rootDir }}/build/resources/docker/Dockerfile
build-args: |
JAR=${{ inputs.rootDir }}/build/libs/${{ inputs.imagename }}.jar
OTEL_JAR=${{ inputs.rootDir }}/opentelemetry-javaagent.jar
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ subprojects {

val copyDockerfile = tasks.create("copyDockerfile", Copy::class) {
from(rootProject.projectDir.toPath().resolve("resources"))
into(project.layout.buildDirectory)
into(project.layout.buildDirectory.dir("resources").get().dir("docker"))
include("Dockerfile")
}
shadowJarTask.dependsOn(copyDockerfile)
Expand All @@ -192,7 +192,7 @@ subprojects {
apply(plugin = "com.bmuschko.docker-remote-api")

val dockerTask: DockerBuildImage = tasks.create("dockerize", DockerBuildImage::class) {
dockerFile.set(project.layout.buildDirectory.asFile.get().toPath().resolve("Dockerfile").toFile())
dockerFile.set(project.layout.buildDirectory.asFile.get().toPath().resolve("resources").resolve("docker").resolve("Dockerfile").toFile())

val dockerContextDir = project.projectDir
images.add("${project.name}:${project.version}")
Expand Down

0 comments on commit 2956ac8

Please sign in to comment.