// Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
// Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
utils.logWarning("Cache action is not supported on GHES");
utils.setCacheHitOutput(false);
return;
}
// Validate inputs, this can cause task failure
if(!utils.isValidEvent()){
utils.logWarning(`Event Validation Error: The event type ${process.env[constants_1.Events.Key]} is not supported because it's not tied to a branch or tag ref.`);
utils.logWarning("Cache action is not supported on GHES");
utils.setCacheHitOutput(false);
return;
}
// Validate inputs, this can cause task failure
if(!utils.isValidEvent()){
utils.logWarning(`Event Validation Error: The event type ${process.env[constants_1.Events.Key]} is not supported because it's not tied to a branch or tag ref.`);
// Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
// Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
utils.logWarning("Cache action is not supported on GHES");
return;
}
if(!utils.isValidEvent()){
utils.logWarning(`Event Validation Error: The event type ${process.env[constants_1.Events.Key]} is not supported because it's not tied to a branch or tag ref.`);
return;
}
conststate=utils.getCacheState();
// Inputs are re-evaluted before the post action, so we want the original key used for restore
utils.logWarning("Cache action is not supported on GHES");
return;
}
if(!utils.isValidEvent()){
utils.logWarning(`Event Validation Error: The event type ${process.env[constants_1.Events.Key]} is not supported because it's not tied to a branch or tag ref.`);
return;
}
conststate=utils.getCacheState();
// Inputs are re-evaluted before the post action, so we want the original key used for restore
- [Swift - Swift Package Manager](#swift---swift-package-manager)
## C# - NuGet
Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):
```yaml
@ -47,10 +52,11 @@ Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/packa
Depending on the environment, huge packages might be pre-installed in the global cache folder.
With `actions/cache@v2` you can now exclude unwanted packages with [exclude pattern](https://github.com/actions/toolkit/tree/main/packages/glob#exclude-patterns)
@ -137,6 +173,8 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
## Java - Gradle
>Note: Ensure no Gradle daemons are running anymore when your workflow completes. Creating the cache package might fail due to locks being held by Gradle. Refer to the [Gradle Daemon documentation](https://docs.gradle.org/current/userguide/gradle_daemon.html) on how to disable or stop the Gradle Daemons.
```yaml
- uses: actions/cache@v2
with:
@ -254,6 +292,7 @@ The yarn cache directory will depend on your operating system and version of `ya
## Node - Yarn 2
The yarn 2 cache directory will depend on your config. See https://yarnpkg.com/configuration/yarnrc#cacheFolder for more info.
```yaml
@ -271,6 +310,7 @@ The yarn 2 cache directory will depend on your config. See https://yarnpkg.com/c
```
## OCaml/Reason - esy
Esy allows you to export built dependencies and import pre-built dependencies.
```yaml
- name: Restore Cache
@ -291,13 +331,12 @@ Esy allows you to export built dependencies and import pre-built dependencies.
...(Build job)...
# Re-export dependencies if anything has changed or if it is the first time