-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Enhancement: Automatically disable unsupported cache actions #989
Comments
This is way too much work and almost impossible to get right |
As a workaround for the first example, you can set - uses: actions/setup-node@v2
with:
cache: ${{ !env.ACT && 'npm' || '' }} Note: Empty string is considered |
Plastering your workflow files with Would it not be possible to just stub this out such that it always returns a negative cache hit, and thus essentially just skips the caching altogether? |
Since act is not only used for local execution this is not an option. |
Instead it would be possible to implement chaching with the embedded artifact server. |
Any hints at what parts of the code base would need to get touched? |
I realize
act
does not support jobs that use caching actions. However, for user convenience I wonder whether the work-arounds (by leveragingif: ${{ !env.ACT }}
) could be avoided by "patching" the original workflow definition.For example, if there was some (e.g. regex based) search & replace logic, code like
could automatically be replaced with
by omitting the final
cache: gradle
. For for a more complex example, code likecould be replaced with
Such a replace logic could either be built into
act
directly, or be freely configurable via some configuration file.The text was updated successfully, but these errors were encountered: