From c76452ef5dce13688869efeb1ceda4aad34a7fe4 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Tue, 14 May 2024 20:47:04 +0900 Subject: [PATCH] replace to json --- .github/workflows/docker-build.yaml | 2 +- docker/autoware-openadk/docker-bake.hcl | 24 ------------------- docker/autoware-openadk/docker-bake.json | 30 ++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 25 deletions(-) delete mode 100644 docker/autoware-openadk/docker-bake.hcl create mode 100644 docker/autoware-openadk/docker-bake.json diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 28b8a79e272..746efb5a285 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -39,7 +39,7 @@ jobs: with: context: . push: true - file: docker/autoware-openadk/docker-bake.hcl + file: docker/autoware-openadk/docker-bake.json targets: default tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/docker/autoware-openadk/docker-bake.hcl b/docker/autoware-openadk/docker-bake.hcl deleted file mode 100644 index 899198c0fef..00000000000 --- a/docker/autoware-openadk/docker-bake.hcl +++ /dev/null @@ -1,24 +0,0 @@ -group "default" { - targets = ["prebuilt", "devel", "runtime"] -} - -target "prebuilt" { - dockerfile = "docker/autoware-openadk/Dockerfile" - target = "prebuilt" - cache-from = ["type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:buildcache"] - cache-to = ["type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:buildcache,mode=max"] -} - -target "devel" { - dockerfile = "docker/autoware-openadk/Dockerfile" - target = "devel" -cache-from = ["type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:buildcache"] - cache-to = ["type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:buildcache,mode=max"] -} - -target "runtime" { - dockerfile = "docker/autoware-openadk/Dockerfile" - target = "runtime" - cache-from = ["type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:buildcache"] - cache-to = ["type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:buildcache,mode=max"] -} diff --git a/docker/autoware-openadk/docker-bake.json b/docker/autoware-openadk/docker-bake.json new file mode 100644 index 00000000000..298740128c1 --- /dev/null +++ b/docker/autoware-openadk/docker-bake.json @@ -0,0 +1,30 @@ +{ + "group": { + "default": { + "targets": ["prebuilt", "devel", "runtime"] + } + }, + "target": { + "prebuilt": { + "context": ".", + "dockerfile": "docker/autoware-openadk/Dockerfile", + "target": "prebuilt", + "cache-from": ["type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:buildcache"], + "cache-to": ["type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:buildcache,mode=max"] + }, + "devel": { + "context": ".", + "dockerfile": "docker/autoware-openadk/Dockerfile", + "target": "devel", + "cache-from": ["type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:buildcache"], + "cache-to": ["type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:buildcache,mode=max"] + }, + "runtime": { + "context": ".", + "dockerfile": "docker/autoware-openadk/Dockerfile", + "target": "runtiem", + "cache-from": ["type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:buildcache"], + "cache-to": ["type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:buildcache,mode=max"] + } + } +}