mirror of
https://github.com/creshpay/action-cached-git-lfs-pull.git
synced 2024-11-23 11:03:51 +08:00
feat: initial version (#1)
This commit is contained in:
parent
5d7d3c08df
commit
1f95b517a7
32
README.md
Normal file
32
README.md
Normal file
@ -0,0 +1,32 @@
|
||||
# Action-cached-git-fls-pull
|
||||
|
||||
This action is used to do git pull LFS leveraging github action cache
|
||||
|
||||
## Requirement
|
||||
|
||||
Your have to checkout your project containing the Dockerfile before running the action. Be sure to set lfs to false.
|
||||
|
||||
## Usage
|
||||
|
||||
See [action.yml](action.yml)
|
||||
|
||||
Basic:
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Pull LFS
|
||||
uses: cresh-io/action-cached-git-lfs-pull@v1
|
||||
```
|
||||
|
||||
## Thanks
|
||||
|
||||
This composite is inspired of the great works of : [action-cached-lfs-checkout](https://github.com/nschloe/action-cached-lfs-checkout)
|
||||
|
||||
## License
|
||||
|
||||
The scripts and documentation in this project are released under the [MIT License](LICENSE)
|
27
action.yml
Normal file
27
action.yml
Normal file
@ -0,0 +1,27 @@
|
||||
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@v2
|
||||
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
|
Loading…
Reference in New Issue
Block a user