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

Remove save-always usage #934

Open
wants to merge 1 commit into
base: v2-branch
Choose a base branch
from

Conversation

DavisVaughan
Copy link
Member

Closes #928

I don't think this is quite right yet but it may be as far as i can take it

When the GitHub team deprecated save-always, they provided some guidance on how to update:
https://github.com/actions/cache/tree/main/save#always-save-cache

The gist is that we have to split our usage into separate explicit save/restore steps.

I am quite uncertain of how to use the magic always() if conditional, what we want is:

  • Save the cache if inputs.cache = 'always' || inputs.cache = 'true' and the workflow hasn't failed so far
  • Save the cache if inputs.cache = 'always', regardless of whether or not the workflow has failed

I tried encoding this using always() but it feels fishy. I'm not sure if always() needs to be at the very beginning of the if: or not. Here are the docs on it:
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#always

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

save-always deprecation warning from actions/cache
1 participant