Skip to content

Scheduling infrastructure for absolutely everyone.

ci: optimize sparse-checkout and cache to reduce cache size (#26692)

Keith Williams784db75b3870
diff --git a/.github/actions/cache-checkout/action.yml b/.github/actions/cache-checkout/action.yml
index 706d9b54625..8fd22c706ef 100644
--- a/.github/actions/cache-checkout/action.yml
+++ b/.github/actions/cache-checkout/action.yml
@@ -12,6 +12,7 @@ runs:
!.git
!node_modules
!**/node_modules
+ !apps/web/public/app-store
key: git-checkout-${{ github.head_ref || github.ref_name }}-${{ github.event.pull_request.head.sha || github.sha }}
- name: Checkout PR code (on cache miss)
if: steps.cache-checkout.outputs.cache-hit != 'true'
@@ -24,3 +25,8 @@ runs:
/*
!/example-apps/
!**/*.mp4
+ !/docs/images/
+ !packages/app-store/*/static/*.png
+ !packages/app-store/*/static/*.jpg
+ !packages/app-store/*/static/*.jpeg
+ !packages/app-store/*/static/*.gif
diff --git a/.github/actions/dangerous-git-checkout/action.yml b/.github/actions/dangerous-git-checkout/action.yml
index 6a3dd50f87d..59789880255 100644
--- a/.github/actions/dangerous-git-checkout/action.yml
+++ b/.github/actions/dangerous-git-checkout/action.yml
@@ -13,3 +13,8 @@ runs:
/*
!/example-apps/
!**/*.mp4
+ !/docs/images/
+ !packages/app-store/*/static/*.png
+ !packages/app-store/*/static/*.jpg
+ !packages/app-store/*/static/*.jpeg
+ !packages/app-store/*/static/*.gif
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index 130380fdbda..cca15895e3f 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -174,6 +174,8 @@ jobs:
db-cache-hit: ${{ steps.cache-db-check.outputs.cache-hit }}
steps:
- uses: actions/checkout@v4
+ with:
+ sparse-checkout: .github
- uses: ./.github/actions/cache-checkout
- name: Generate DB cache key
id: cache-db-key