Skip to content

Commit

Permalink
Added toggle for cache
Browse files Browse the repository at this point in the history
  • Loading branch information
NotBjoggisAtAll authored and slawekjaranowski committed Nov 23, 2023
1 parent 57ca7f1 commit 5727e29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -105,6 +110,7 @@ runs:
distribution: '${{ inputs.java-distribution }}'

- uses: actions/cache@v3
if: inputs.cache-enabled == 'true'
with:
path: |
${{ inputs.cache-path }}
Expand Down

0 comments on commit 5727e29

Please sign in to comment.