Skip to content

Commit

Permalink
Merge pull request #539 from Bisaloo/disable-cache-option
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi authored Apr 1, 2022
2 parents 81fc729 + e99b4a9 commit 58a65c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion setup-r-dependencies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ This action install dependencies for the current R environment based on the DESC

Inputs available

- `cache` - default `true`. Whether packages should be cached across runs or
not.
- `cache-version` - default `1`. If you need to invalidate the existing
cache pass any other number and a new cache will be used.
cache pass any other number and a new cache will be used. Ignored if
`cache: false`.
- `dependencies` - default `'"all"'`. Types of dependencies to install. By
default all direct dependencies of the current package are installed, and
hard dependencies of these direct dependencies. See also the `needs` and
Expand Down
7 changes: 6 additions & 1 deletion setup-r-dependencies/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ name: 'setup-r-dependencies'
description: 'Action to setup installation tools and install R dependencies'
author: 'Jim Hester'
inputs:
cache:
description: 'A boolen value indicating whether packages should be cached from one to the other'
required: true
default: true
cache-version:
description: 'The version of the cache, change this from the default (1) to start over with a fresh cache'
description: 'The version of the cache, change this from the default (1) to start over with a fresh cache. Ignored if cache: false'
required: true
default: 1
extra-packages:
Expand Down Expand Up @@ -53,6 +57,7 @@ runs:
working-directory: ${{ inputs.working-directory }}

- name: Restore R package cache
if: inputs.cache == 'true'
uses: actions/cache@v2
with:
path: |
Expand Down

0 comments on commit 58a65c1

Please sign in to comment.