Skip to content

Commit

Permalink
Experiment: use GHA cache for docker builds [fix]
Browse files Browse the repository at this point in the history
  • Loading branch information
alukach committed Dec 20, 2024
1 parent 2f68623 commit 296f13d
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions images/cloud_run_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ def construct_name(resource_name: str) -> str:
build=docker.DockerBuildArgs(
context="../",
dockerfile="../Dockerfiles/Dockerfile.cloud_run_offset",
cache_from={"type": "gha"},
cache_to={"type": "gha", "mode": "max"},
extra_options=[
"--output=type=docker",
"--cache-from=type=local,src=/tmp/.buildx-cache",
"--cache-to=type=local,dest=/tmp/.buildx-cache",
],
target="final",
),
image_name=cloud_run_offset_tile_image_url,
Expand All @@ -77,8 +80,11 @@ def construct_name(resource_name: str) -> str:
build=docker.DockerBuildArgs(
context="../",
dockerfile="../Dockerfiles/Dockerfile.cloud_run_orchestrator",
cache_from={"type": "gha"},
cache_to={"type": "gha", "mode": "max"},
extra_options=[
"--output=type=docker",
"--cache-from=type=local,src=/tmp/.buildx-cache",
"--cache-to=type=local,dest=/tmp/.buildx-cache",
],
target="final",
),
image_name=cloud_run_orchestrator_image_url,
Expand All @@ -89,8 +95,11 @@ def construct_name(resource_name: str) -> str:
build=docker.DockerBuildArgs(
context="../",
dockerfile="../Dockerfiles/Dockerfile.cloud_run_tipg",
cache_from={"type": "gha"},
cache_to={"type": "gha", "mode": "max"},
extra_options=[
"--output=type=docker",
"--cache-from=type=local,src=/tmp/.buildx-cache",
"--cache-to=type=local,dest=/tmp/.buildx-cache",
],
target="final",
),
image_name=cloud_run_tipg_image_url,
Expand Down

0 comments on commit 296f13d

Please sign in to comment.