Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache-on-failure support #22

Merged
merged 9 commits into from Jun 28, 2021
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/selftest.yml
Expand Up @@ -22,8 +22,10 @@ jobs:
override: true

- uses: ./
with:
cache-on-failure: true

- run: |
cargo install cargo-deny --locked
cargo check
cargo test
cargo test
5 changes: 4 additions & 1 deletion action.yml
Expand Up @@ -14,14 +14,17 @@ inputs:
target-dir:
description: "The target dir that should be cleaned and persisted, defaults to `./target`"
required: false
cache-on-failure:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you put this into the readme as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

description: "Cache even if the build fails. Defaults to false"
required: false
outputs:
cache-hit:
description: "A boolean value that indicates an exact match was found"
runs:
using: "node12"
main: "dist/restore/index.js"
post: "dist/save/index.js"
post-if: "success()"
post-if: "success() || env.CACHE_ON_FAILURE == 'true'"
branding:
icon: "archive"
color: "gray-dark"