jacksmith15/Job Cache
Determine if the job has already run for the currently checked out files.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stalelast commit Sep 28, 2023
- License
- MIT
Pinned Snippet
uses: jacksmith15/job-cache-action@cdf10eacfe14da78348c2f633e89f3a0df8670d2 # v2.0.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| prefix | Optionally specify a prefix for the cache key. This allows namespacing to avoid collisions, for example when caching multiple different jobs on the same input files. | — | "" |
| paths | The paths to include in the cache key calculation. This should cover the full set of files which might influence whether the job passes or fails. By default this includes all files, to be safe. The format is a series of git pathspecs. See https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec for details on globbing, excludes and more. Note that it is recommended to include any GitHub workflow files, as these can affect job outcomes. | — | :/ |
| global | Whether to share the cache between all branches (recommended). If set to false, will only check for previous passes on the current branch, the base branch (if a PR), and the repository's default branch. When set to false, a github token is not necessary. | — | true |
Outputs
| name | description |
|---|---|
| sha | The computed SHA-256 of checked-out files, filtered by the paths argument. |
| key | The computed cache key. |
| passed | Whether a previous run for identical files already passed. This can be used to skip job subsequent steps or jobs. Returns 'true' if an entry with the correct key exists in the cache, otherwise returns 'false'. |