From f8fcda04fbadc986e249de99f10f17bd86a480f9 Mon Sep 17 00:00:00 2001 From: "Shkar T. Noori" Date: Mon, 14 Feb 2022 10:14:32 +0000 Subject: [PATCH] Fix image cache --- .github/workflows/deploy-dev.yaml | 10 ++++------ .github/workflows/deploy-production.yaml | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-dev.yaml b/.github/workflows/deploy-dev.yaml index 4e73468..a910982 100644 --- a/.github/workflows/deploy-dev.yaml +++ b/.github/workflows/deploy-dev.yaml @@ -17,12 +17,10 @@ jobs: name: Setup runs-on: ubuntu-20.04 env: - IMAGE_REPO: reg.dev.krd/dit-docs/dsm-client + IMAGE: "reg.dev.krd/dit-docs/dsm-client:${{ github.ref_name }}" steps: - name: Extract image name - run: | - REF_NAME=$(echo ${GITHUB_REF##*/}) - echo "IMAGE=$IMAGE_REPO:$REF_NAME" >> $GITHUB_ENV + run: echo "Using image name $IMAGE" outputs: image: ${{ env.IMAGE }} image-sha: ${{ env.IMAGE }}-${{ github.sha }} @@ -53,8 +51,8 @@ jobs: tags: |- ${{ needs.setup.outputs.image }} ${{ needs.setup.outputs.image-sha }} - cache-from: type=registry,ref=${{ needs.setup.outputs.image }}-buildcache - cache-to: type=registry,ref=${{ needs.setup.outputs.image }}-buildcache,mode=max + cache-from: type=registry,ref=${{ needs.setup.outputs.image }} + cache-to: type=inline deploy: uses: ditkrg/dit-digital-service-manual/.github/workflows/deploy-base.yaml@dev diff --git a/.github/workflows/deploy-production.yaml b/.github/workflows/deploy-production.yaml index b9290dd..9b3b294 100644 --- a/.github/workflows/deploy-production.yaml +++ b/.github/workflows/deploy-production.yaml @@ -51,8 +51,8 @@ jobs: tags: |- ${{ needs.setup.outputs.image }} ${{ needs.setup.outputs.image-sha }} - cache-from: type=registry,ref=${{ needs.setup.outputs.image }}-buildcache - cache-to: type=registry,ref=${{ needs.setup.outputs.image }}-buildcache,mode=max + cache-from: type=registry,ref=${{ needs.setup.outputs.image }} + cache-to: type=inline deploy: uses: ditkrg/dit-digital-service-manual/.github/workflows/deploy-base.yaml@main