Added toggle for cache

This commit is contained in:
Jonas Bjørge Andersen 2023-11-23 16:09:17 +01:00 committed by Slawomir Jaranowski
parent 57ca7f1a81
commit 5727e29093
2 changed files with 7 additions and 0 deletions

View File

@ -60,6 +60,7 @@ So we can use for action:
| params | description |
|----------------|----------------------------------------------------------|
| cache-enabled | enable cache. Default true |
| cache-path | default cache path for Maven with value ~/.m2/repository |
| cache-path-add | additional value for cache path |
| cache-prefix | prefix value for `key` and `restore-keys` cache params |

View File

@ -48,6 +48,11 @@ inputs:
required: false
# cache
cache-enabled:
description: 'Enable cache'
default: 'true'
required: false
cache-prefix:
description: 'Cache key prefix'
required: false
@ -105,6 +110,7 @@ runs:
distribution: '${{ inputs.java-distribution }}'
- uses: actions/cache@v3
if: inputs.cache-enabled == 'true'
with:
path: |
${{ inputs.cache-path }}