From 2fa22b4b8521caa5a7c3f2e85932649a0bc776cd Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 30 Jan 2025 14:05:53 +0000 Subject: [PATCH] chore: workflow added rebuild on cache miss --- .github/workflows/tests.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ce924e20d3..c5a565b269 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -138,12 +138,29 @@ jobs: uses: actions/checkout@v4 - name: Load Cache + id: cache-docker-image uses: actions/cache@v4 with: key: ${{ env.CACHE_KEY }} path: /tmp/${{ env.IMAGE }}.tar fail-on-cache-miss: true + - name: Build Docker Image if Cache Missed + if: steps.cache-docker-image.outputs.cache-hit != 'true' + uses: docker/build-push-action@v3 + with: + context: . + push: false + tags: ${{ env.IMAGE }} + load: true + cache-from: type=gha + cache-to: type=gha,mode=max + outputs: type=docker,dest=/tmp/${{ env.IMAGE }}.tar + build-args: | + DEBUG=false + TESTING=true + VERSION=dev + - name: Load and Start Appwrite run: | docker load --input /tmp/${{ env.IMAGE }}.tar