From 253eccfb68dcdcf23cdf036c113d38c66b5c5795 Mon Sep 17 00:00:00 2001 From: Yanir Seroussi Date: Tue, 25 Oct 2022 13:45:49 +1000 Subject: [PATCH] Document the use of scope with GHA caching Resolves #706 Signed-off-by: Yanir Seroussi --- docs/advanced/cache.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/advanced/cache.md b/docs/advanced/cache.md index 561bbd9..cbbfad0 100644 --- a/docs/advanced/cache.md +++ b/docs/advanced/cache.md @@ -109,6 +109,10 @@ exclusively used in a GitHub Action workflow as the `url` (`$ACTIONS_CACHE_URL`) and `token` (`$ACTIONS_RUNTIME_TOKEN`) attributes are populated when a workflow is started. +When building multiple images, add `scope=` to `cache-from` and `cache-to` to avoid +overwriting the cache index. See the docs for +[GitHub Actions cache](https://docs.docker.com/build/building/cache/backends/gha/#scope). + ```yaml name: ci