Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bhacaz/checkout-files
Github Action checkout only certain files
https://github.com/bhacaz/checkout-files
Last synced: 6 days ago
JSON representation
Github Action checkout only certain files
- Host: GitHub
- URL: https://github.com/bhacaz/checkout-files
- Owner: Bhacaz
- License: mit
- Created: 2020-08-19T00:21:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-09T13:27:42.000Z (about 1 year ago)
- Last Synced: 2024-10-29T19:58:18.402Z (9 days ago)
- Language: JavaScript
- Size: 1.08 MB
- Stars: 35
- Watchers: 3
- Forks: 10
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# checkout-files
⚠️ Please consider using `actions/checkout` with the option [`sparse-checkout`](https://github.com/actions/checkout#fetch-only-a-single-file).
GitHub Action to checkout only certain files and/or folders.
Useful if only need certain files, like config or
assets for your workflow, instead of pulling the whole repo.## Usage
Minimal setup.
```yaml
- name: Checkout files
uses: Bhacaz/checkout-files@v2
with:
files: package.json
```## Inputs
|Name| Description | Required |Default|
|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|---|
|`files`| A list of files with the path separated by a space, relative to root of your repository. Can also be a folder and the action will recursively pull all the files. | `true` |N/A|
|`token`| A GitHub token. | `false` |`${{ github.token }}`|
|`branch`| Checkout files from a specific branch. If not specified, it use the default repository branch.
To use the current working branch `${{ github.head_ref \|\| github.ref_name }}` |`false`|Default branch of the repository.|## Limitations
* This action doesn't keep the mode bits (or permission) of files. See [#18](https://github.com/Bhacaz/checkout-files/issues/18) for more details.
* Cannot pull files bigger than 1 mb. WIP [#3](https://github.com/Bhacaz/checkout-files/issues/3) & [#9](https://github.com/Bhacaz/checkout-files/issues/9)