From fc31ca3d8683c6e90c91602c9bafb88375a64b74 Mon Sep 17 00:00:00 2001 From: db123-test Date: Mon, 4 May 2026 13:34:39 +0330 Subject: [PATCH] chore(ci): add Docker buildx layer caching to CI/CD workflow Enable registry-based caching for Docker builds by adding --cache-from and --cache-to flags. This reuses cached layers from previous builds to speed up build times and reduce network usage. --- .github/workflows/ci-cd.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 87b9063..aeca32b 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -35,13 +35,13 @@ jobs: # steps: # - name: Checkout repo # run: git clone "${{ secrets.G_CLONE_URL }}" . - + # # - name: Build for Linux amd64 # run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 /usr/local/go/bin/go build -o auth-proxy-linux-amd64 . - + # # - name: Build for Windows amd64 # run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 /usr/local/go/bin/go build -o auth-proxy-windows-amd64.exe - + # # - name: Package binaries # run: | # tar czf auth-proxy-linux-amd64.tar.gz auth-proxy-linux-amd64 @@ -70,5 +70,7 @@ jobs: --platform linux/amd64 \ --tag "git.yejayekhoob.com/db123/auth-proxy:${{ github.sha }}" \ --tag "git.yejayekhoob.com/db123/auth-proxy:latest" \ + --cache-from=type=registry,ref=git.yejayekhoob.com/db123/auth-proxy:cache \ + --cache-to=type=registry,ref=git.yejayekhoob.com/db123/auth-proxy:cache,mode=max \ --push \ - . \ No newline at end of file + .