Skip to content

Commit 2ba2c3b

Browse files
committed
Try caching git lfs files
1 parent 4b35726 commit 2ba2c3b

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/build-linux.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,25 @@ jobs:
1414
steps:
1515
- name: Checkout
1616
uses: actions/[email protected]
17-
with:
18-
lfs: true
19-
- name: Checkout LFS objects
17+
18+
- name: Create LFS file list
2019
run: |
21-
git lfs checkout
20+
git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
21+
22+
- name: Restore LFS cache
23+
uses: actions/cache@v3
24+
id: lfs-cache
25+
with:
26+
path: .git/lfs
27+
key: ${{ runner.os }}-${{ hashFiles('.lfs-assets-id') }}-v1
28+
29+
- name: Git LFS Pull
30+
run: git lfs pull
31+
if: steps.lfs-cache.outputs.cache-hit != 'true'
32+
33+
- name: Git LFS Checkout
34+
run: git lfs checkout
35+
if: steps.lfs-cache.outputs.cache-hit == 'true'
2236

2337
- name: Install dependencies Linux
2438
run: |

0 commit comments

Comments
 (0)