bsteffaniak/Cache Artifact

Checksums a directory or git repository and conditionally runs commands with intelligent artifact caching

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Apr 29, 2026
License
None

Pinned Snippet

workflow.ymlSHA-pinned
uses: bsteffaniak/cache-artifact@98aa4b9aa92cd3ef9e267baab324ef58c72637d0 # v1.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
directoryDirectory to checksum for change detection (mutually exclusive with repo)no""
repoGit repository URL to checksum for change detection (mutually exclusive with directory)no""
commandCustom command to run when changes are detectedyes
output-pathPath to the output file/artifact created by the commandyes
artifact-nameName for the artifact (defaults to directory name + checksum)no""
cache-key-prefixPrefix for cache keys (defaults to repository name)no""
working-directoryWorking directory to run the command inno.
shellShell to use for running commandsnobash
make-executableWhether to make the output file executablenofalse
verify-commandCommand to run to verify the output works (e.g., "--version")no""
github-tokenGitHub token for downloading artifacts from other workflow runs (requires actions:read permission)no${{ github.token }}
scopeScope for artifact naming: 'run' (workflow run ID), 'workflow' (workflow name), 'job' (job ID), 'repo' (repository name), or 'none' (no suffix). Defaults to 'workflow' when github-token is not provided, 'none' when custom token is provided.no""
namedescription
cache-hitWhether the cache was hit (true/false)
checksumThe computed checksum of the directory
artifact-nameThe name of the uploaded/downloaded artifact