cached-git-lfs-pull/action.yml

28 lines
610 B
YAML
Raw Permalink Normal View History

2021-12-02 18:25:28 +08:00
name: Git lfs pull using github action cache
description: This action is used to do git pull LFS leveraging github action cache
branding:
icon: "download"
color: "purple"
runs:
using: "composite"
steps:
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
shell: bash
- name: Restore LFS cache
uses: actions/cache@v3
2021-12-02 18:25:28 +08:00
id: lfs-cache
with:
path: .git/lfs
key: lfs-${{ hashFiles('.lfs-assets-id') }}
restore-keys: |
lfs-
- name: Git LFS Pull
run: git lfs pull
shell: bash