GitHub action for storing modified files to cache, to be restored by unshelve-changes-action in another job later.
Uses git to detect changed files.
Store the modified files to cache:
- uses: prantlf/shelve-changes-action@v1
Store only some of the modified files to cache, if there're more modified on the disk:
- uses: prantlf/shelve-changes-action@v1
with:
add-modified: false
add-extra: |
package.json
CHANGELOG.md
The following parameters can be specified using the with
object:
Type: String
Default: 'main master'
Branches which this action should run for, which are used to publishing releases. Use whitespace for separating the branch names. If you want to use multiple lines in YAML, introduce them with ">-". If you want to allow all branches, set the value to "*".
Type: Boolean
Default: true
Can be set to false
to prevent this action from running. It's helpful in the pipeline, which will not continue releasing, but only building and testing, and that will be decided in the middle of a job execution.
Type: Boolean
Default: true
Can be set to false
to prevent modified files from adding to the cache.
Type: Boolean
Default: false
Can be set to true
to add also newly created files to the cache.
Type: String
Additional files for putting to cache by this action, separated by spaces. They should not be picked by add-modified
or add-new
to avoid duplicates in the final list.
The following parameters can be accessed by the github
context:
Type: Boolean
Set to true
if the files were stored to cache.
Type: String
Files put by this action to cache, separated by spaces.
Type: String
The key, which was used to store the files to cache.
Copyright (C) 2023-2024 Ferdinand Prantl
Licensed under the MIT License.