Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
walkowif committed May 16, 2024
1 parent 55a44c9 commit bd04b23
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/build-check-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,11 @@ jobs:
- name: Install dependencies from package repositories 🗄️
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)
}
if (!require("pak")) install.packages("pak", upgrade = "never")
pak::repo_add(split_to_map("${{ inputs.install-deps-from-package-repositories }}"))
package_repositories <- "${{ inputs.install-deps-from-package-repositories }}"
pairs <- strsplit(package_repositories, ",")[[1]]
urls <- sapply(strsplit(pairs, "="), `[`, 2)
lapply(urls, function(x){pak::repo_add(x)})
cat("Currently configured pak repositories:\n")
pak::repo_get()
pak::local_install_dev_deps(root = ".", upgrade = FALSE)
Expand Down

0 comments on commit bd04b23

Please sign in to comment.