chore: workflow added rebuild on cache miss

This commit is contained in:
Chirag Aggarwal
2025-01-30 14:05:53 +00:00
parent 3522e63404
commit 2fa22b4b85
+17
View File
@@ -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