From 802bb7a2a8657b9c51a4a6f2e928ee0354e60cc9 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sat, 14 Dec 2024 08:47:10 -0500 Subject: [PATCH] ci: speed up ci image generation with a docker layer cache --- .github/workflows/generate-ci-images.yml | 2 ++ rakelib/docker.rake | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/generate-ci-images.yml b/.github/workflows/generate-ci-images.yml index 943c21263a..c3c46e2ee4 100644 --- a/.github/workflows/generate-ci-images.yml +++ b/.github/workflows/generate-ci-images.yml @@ -35,3 +35,5 @@ jobs: push: true tags: ghcr.io/sparklemotion/nokogiri-test:${{matrix.tag}} file: oci-images/nokogiri-test/${{matrix.tag}}.dockerfile + cache-from: type=registry,ref=ghcr.io/sparklemotion/nokogiri-test:${{ matrix.tag }}-cache + cache-to: type=registry,ref=ghcr.io/sparklemotion/nokogiri-test:${{ matrix.tag }}-cache,mode=max diff --git a/rakelib/docker.rake b/rakelib/docker.rake index dfaa7b5247..149b584448 100644 --- a/rakelib/docker.rake +++ b/rakelib/docker.rake @@ -87,6 +87,8 @@ module DockerHelper push: true tags: #{IMAGE_NAME}:${{matrix.tag}} file: #{IMAGE_DIR}/${{matrix.tag}}.dockerfile + cache-from: type=registry,ref=ghcr.io/sparklemotion/nokogiri-test:${{ matrix.tag }}-cache + cache-to: type=registry,ref=ghcr.io/sparklemotion/nokogiri-test:${{ matrix.tag }}-cache,mode=max YAML puts "writing #{filename} ..."