Skip to content

Commit

Permalink
Change input name
Browse files Browse the repository at this point in the history
  • Loading branch information
walkowif committed Nov 23, 2023
1 parent caeef2e commit e45d59f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-check-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ on:
required: false
type: string
default: upstream
install-deps-from-cran:
install-deps-from-package-repositories:
description: Set this to a comma-separated list of R packages repositories to use for installing dependencies
required: false
type: string
Expand Down Expand Up @@ -309,14 +309,14 @@ jobs:
path: ${{ github.event.repository.name }}

- name: Restore SD cache 💰
if: inputs.install-deps-from-cran == ''
if: inputs.install-deps-from-package-repositories == ''
uses: actions/cache@v3
with:
key: sd-${{ runner.os }}-${{ github.event.repository.name }}
path: ~/.staged.dependencies

- name: Run Staged dependencies 🎦
if: inputs.install-deps-from-cran == ''
if: inputs.install-deps-from-package-repositories == ''
uses: insightsengineering/staged-dependencies-action@v1
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
Expand All @@ -327,15 +327,15 @@ jobs:
direction: ${{ inputs.sd-direction }}

- name: Install dependencies from package repositories 🗄️
if: inputs.install-deps-from-cran != ''
if: inputs.install-deps-from-package-repositories != ''
run: |
split_to_map <- function(args) {
tmp <- strsplit(x = unlist(strsplit(args, ",")), "=")
content <- unlist(lapply(tmp, function(x) x[2]))
names(content) <- unlist(lapply(tmp, function(x) x[1]))
return(content)
}
devtools::install_dev_deps(".", repos = split_to_map("${{ inputs.install-deps-from-cran }}"))
devtools::install_dev_deps(".", repos = split_to_map("${{ inputs.install-deps-from-package-repositories }}"))
shell: Rscript {0}
working-directory: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}

Expand Down

0 comments on commit e45d59f

Please sign in to comment.