summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupahgreg <supahgreg@users.noreply.github.com>2025-10-14 18:14:04 +0000
committersupahgreg <supahgreg@users.noreply.github.com>2025-10-14 18:14:04 +0000
commit368969224c34f6057e86e5e3319a3e45f6925122 (patch)
treeafccf941b7851b2835db38b7a75b78ee97ab27d6
parente0e0a0fab0244ee1b44c155518b7c647bc7ef014 (diff)
Add Docker build caching to the Publish workflow.
Prefer the GitHub Actions cache, and fall back to GitHub Container Registry if needed.
-rw-r--r--.github/workflows/publish.yml6
1 files changed, 6 insertions, 0 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index ce4bb81e9..786e66207 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -104,6 +104,12 @@ jobs:
context: .
file: ${{ matrix.image.dockerfile }}
platforms: linux/arm64,linux/amd64
+ cache-from: |
+ type=gha,scope=${{ matrix.image.name }}
+ type=registry,ref=${{ matrix.image.repository_ghcr }}:cache
+ cache-to: |
+ type=gha,scope=${{ matrix.image.name }},mode=max
+ type=registry,ref=${{ matrix.image.repository_ghcr }}:cache,mode=max
# TODO: clean up build arg and environment variable naming.
build-args: |
CI_COMMIT_BRANCH=${{ github.ref_name }}