From 3f5e23723c5d385f2fcec719579e7138bacbfab0 Mon Sep 17 00:00:00 2001 From: innovaker <66737976+innovaker@users.noreply.github.com> Date: Sun, 9 May 2021 22:35:42 +0100 Subject: [PATCH] refactor: remove `CACHE_FROM` and `CACHE_TO` Having these in the `vars` step provides little benefit going forward. Moving them to the `build-push` step improves the readability. PR: #20 --- .github/workflows/containers.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 4c8c2ed..52ccafe 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -39,11 +39,6 @@ jobs: NAME=zmk-${{ matrix.target }}-${{ matrix.architecture }} echo ::set-output name=name::${NAME} - CACHE_FROM=${{ env.cache-repository-name }}:dev - CACHE_TO=${{ env.cache-repository-name }}:${{ matrix.target }} - echo ::set-output name=cache-from::${CACHE_FROM} - echo ::set-output name=cache-to::${CACHE_TO} - CANDIDATE_TAG=${NAME}:${{ github.sha }} echo ::set-output name=candidate-tag::${CANDIDATE_TAG} @@ -80,8 +75,8 @@ jobs: org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} tags: | docker.io/${{ secrets.DOCKER_HUB_NAMESPACE }}/${{ steps.vars.outputs.candidate-tag }} - cache-from: type=registry,ref=docker.io/${{ secrets.DOCKER_HUB_NAMESPACE }}/${{ steps.vars.outputs.cache-from }} - cache-to: type=registry,ref=docker.io/${{ secrets.DOCKER_HUB_NAMESPACE }}/${{ steps.vars.outputs.cache-to }},mode=max + cache-from: type=registry,ref=docker.io/${{ secrets.DOCKER_HUB_NAMESPACE }}/${{ env.cache-repository-name }}:dev + cache-to: type=registry,ref=docker.io/${{ secrets.DOCKER_HUB_NAMESPACE }}/${{ env.cache-repository-name }}:${{ matrix.target }},mode=max push: true - name: Image digest if: ${{ !startsWith(github.ref, 'refs/tags') }}