Unverified Commit b156d58c authored by Daz DeBoer's avatar Daz DeBoer Committed by GitHub
Browse files

Document the cache-overwrite-existing parameter

parent b946c060
Loading
Loading
Loading
Loading
+14
Changes for README.md: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -145,6 +145,20 @@ In certain circumstances it may be desirable to start with a clean Gradle User H
cache-write-only: true
```

### Overwriting an existing Gradle User Home

When the action detects that the Gradle User Home caches directory already exists (`~/.gradle/caches`), then by default it will not overwrite the existing content of this directory.
This can occur when a prior action initializes this directory, or when using a self-hosted runner that retains this directory between uses.

In this case the Job Summary will display a message like: 
> Caching for gradle-build-action was disabled due to pre-existing Gradle User Home

If you want override the default and have the `gradle-build-action` caches overwrite existing content in the Gradle User Home, you can set the `cache-overwrite-existing` parameter to 'true':

```yaml
cache-overwrite-existing: true
```

### Incompatibility with other caching mechanisms

When using `gradle-build-action` we recommend that you avoid using other mechanisms to save and restore the Gradle User Home.