From 701ae249810475e699a921cc6085607a7b89c821 Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Date: Mon, 3 Nov 2025 13:15:10 -0300 Subject: [PATCH] chore: better and more secure docker cache --- .dockerignore | 9 +++++---- .github/workflows/deploy.yml | 8 ++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.dockerignore b/.dockerignore index 2418a9e..87b5fbb 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,11 +1,12 @@ -node_modules -dist +node_modules/* +dist/* +.k8s/* +.github/* -.github .gitignore +.dockerignore Dockerfile README.md -.k8s .env .secret \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ff10718..344e1bb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -80,8 +80,12 @@ jobs: tags: | ${{ env.IMAGE_LATEST }} ${{ env.IMAGE_SHA }} - cache-from: type=registry,ref=ghcr.io/hideyoshisolutions/frontend-hideyoshi.com:cache - cache-to: type=registry,ref=ghcr.io/hideyoshisolutions/frontend-hideyoshi.com:cache,mode=max + cache-from: | + type=registry,ref=ghcr.io/hideyoshisolutions/frontend-hideyoshi.com:cache-${{ github.ref_name }}-amd64 + type=registry,ref=ghcr.io/hideyoshisolutions/frontend-hideyoshi.com:cache-${{ github.ref_name }}-arm64 + cache-to: | + type=registry,ref=ghcr.io/hideyoshisolutions/frontend-hideyoshi.com:cache-${{ github.ref_name }}-amd64,mode=max,platform=linux/amd64 + type=registry,ref=ghcr.io/hideyoshisolutions/frontend-hideyoshi.com:cache-${{ github.ref_name }}-arm64,mode=max,platform=linux/arm64 deploy: needs: [docker]