From 5e0400cd2f5aae334873e23be8c17a77f0054d25 Mon Sep 17 00:00:00 2001 From: innovaker <66737976+innovaker@users.noreply.github.com> Date: Fri, 14 May 2021 19:12:34 +0100 Subject: [PATCH] refactor: remove `build` registry cache `build` is a subset of `dev`, so there's no need to save both to the registry with `mode=max`. PR: #35 --- .github/workflows/containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index db2cf84..df1cc16 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -94,7 +94,7 @@ jobs: tags: | docker.io/${{ steps.vars.outputs.docker-hub-namespace }}/${{ steps.vars.outputs.candidate-tag }} cache-from: type=registry,ref=docker.io/${{ steps.vars.outputs.docker-hub-namespace }}/${{ env.cache-repository-name }}:dev - cache-to: ${{ (steps.docker-hub-login.outcome == 'success') && format('type=registry,ref=docker.io/{0}/{1}:{2},mode=max', steps.vars.outputs.docker-hub-namespace, env.cache-repository-name, matrix.target) || null }} + cache-to: ${{ (steps.docker-hub-login.outcome == 'success') && (matrix.target == 'dev') && format('type=registry,ref=docker.io/{0}/{1}:{2},mode=max', steps.vars.outputs.docker-hub-namespace, env.cache-repository-name, 'dev') || null }} push: ${{ steps.docker-hub-login.outcome == 'success' }} - name: Image digest if: ${{ !startsWith(github.ref, 'refs/tags') }}