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