feat: initial version (#1)

This commit is contained in:
maniolias 2021-12-02 11:25:28 +01:00 committed by GitHub
parent 5d7d3c08df
commit 1f95b517a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 59 additions and 0 deletions

32
README.md Normal file
View 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
View 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