Skip to content

Commit f770522

Browse files
committed
chore: add caching for Docker builds in GitHub Actions workflow to optimize build performance
1 parent 176def5 commit f770522

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ jobs:
8282
build-args: |
8383
VITE_API_BASE_URL=${{ secrets.FRONTEND_API_BASE_URL }}
8484
VITE_UMAMI_SHARE_URL=${{ secrets.FRONTEND_UMAMI_SHARE_URL }}
85+
cache-from: type=registry,ref=ghcr.io/nctucsunion/pastexam:frontend-buildcache
86+
cache-to: type=registry,ref=ghcr.io/nctucsunion/pastexam:frontend-buildcache,mode=max
8587

8688
- name: Build and push Backend Docker image
8789
uses: docker/build-push-action@v4
@@ -93,3 +95,5 @@ jobs:
9395
tags: |
9496
ghcr.io/nctucsunion/pastexam:backend
9597
ghcr.io/nctucsunion/pastexam:backend-${{ github.sha }}
98+
cache-from: type=registry,ref=ghcr.io/nctucsunion/pastexam:backend-buildcache
99+
cache-to: type=registry,ref=ghcr.io/nctucsunion/pastexam:backend-buildcache,mode=max

0 commit comments

Comments
 (0)