Skip to content

Commit

Permalink
Support needs fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jimhester committed Aug 24, 2021
1 parent 12ce88d commit f04c724
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup-r-dependencies/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ inputs:
default: 1
extra-packages:
description: 'Any extra packages to install outside of the packages listed in the dependencies'
needs:
description: 'Any extra Config/Needs fields which need to be included when installing dependencies'
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -35,7 +37,8 @@ runs:

- name: Install dependencies
run: |
local_deps <- pak::local_dev_deps(dependencies = TRUE)[["ref"]]
needs <- c("all", strsplit("${{ inputs.needs }}", "[[:space:],]+"[[1]]))
local_deps <- pak::local_dev_deps(dependencies = needs)[["ref"]]
extra_deps <- strsplit("${{ inputs.extra-packages }}", "[[:space:],]+")[[1]]
if (Sys.info()[["sysname"]] == "Linux") {
pak::local_system_requirements(execute = TRUE)
Expand Down

0 comments on commit f04c724

Please sign in to comment.