Skip to content

Commit

Permalink
enable git lfs cache to avoid billing according to actions/checkout#165
Browse files Browse the repository at this point in the history
  • Loading branch information
fyears committed May 7, 2024
1 parent 2645ff3 commit dc0c1db
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/auto-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@ jobs:
- name: Checkout codes
uses: actions/checkout@v2
with:
lfs: true
submodules: recursive
- name: Checkout LFS
run: git lfs checkout
- name: Checkout LFS file list
run: git lfs ls-files --long | cut -d ' ' -f1 | sort > .lfs-assets-id
- name: LFS Cache
uses: actions/cache@v3
with:
path: .git/lfs/objects
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
restore-keys: |
${{ runner.os }}-lfs-
- name: Git LFS Pull
run: git lfs pull
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,18 @@ jobs:
- name: Checkout codes
uses: actions/checkout@v2
with:
lfs: true
submodules: recursive
- name: Checkout LFS
run: git lfs checkout
- name: Checkout LFS file list
run: git lfs ls-files --long | cut -d ' ' -f1 | sort > .lfs-assets-id
- name: LFS Cache
uses: actions/cache@v3
with:
path: .git/lfs/objects
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
restore-keys: |
${{ runner.os }}-lfs-
- name: Git LFS Pull
run: git lfs pull
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
Expand Down

0 comments on commit dc0c1db

Please sign in to comment.