From 5727e2909320fc46c3232ffe7d215579b3b85abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Bj=C3=B8rge=20Andersen?= Date: Thu, 23 Nov 2023 16:09:17 +0100 Subject: [PATCH] Added toggle for cache --- README.md | 1 + action.yml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 8e219cf..614f834 100644 --- a/README.md +++ b/README.md @@ -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 | diff --git a/action.yml b/action.yml index 70a4985..509fb3e 100644 --- a/action.yml +++ b/action.yml @@ -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 }}