Skip to content

Commit 1476678

Browse files
committed
chore: split restore/save cache
We're hitting cache limits on GHA, just save the cache on main.
1 parent 01bcdce commit 1476678

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ jobs:
5858
- name: Set up Docker Buildx
5959
uses: docker/setup-buildx-action@v3
6060

61-
- name: Setup cache
61+
- name: Restore cache
6262
if: github.event_name != 'workflow_dispatch' || fromJSON(github.event.inputs.useCache)
63-
uses: actions/cache@v4
63+
uses: actions/cache/restore@v3
6464
with:
6565
path: .buildx-cache-${{ matrix.policy }}_${{ matrix.platform }}/*
6666
key: buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}-${{ hashFiles('docker/**') }}
@@ -69,6 +69,13 @@ jobs:
6969
- name: Build
7070
run: ./build.sh
7171

72+
- name: Save cache
73+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
74+
uses: actions/cache/save@v3
75+
with:
76+
path: .buildx-cache-${{ matrix.policy }}_${{ matrix.platform }}/*
77+
key: buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}-${{ hashFiles('docker/**') }}
78+
7279
- name: Deploy
7380
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'pypa/manylinux'
7481
run: ./deploy.sh

0 commit comments

Comments
 (0)