Skip to content

add dependecies workflow #7

add dependecies workflow

add dependecies workflow #7

Workflow file for this run

---
name: Dependencies 📄
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
push:
branches:
- main
workflow_call:
concurrency:
group: dependencies-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
dependencies:
name: ${{ vars.CI_IMAGE }}
runs-on: ubuntu-latest
container:
image: ${{ vars.CI_IMAGE }}
steps:
- name: Checkout project ⬇️
uses: actions/checkout@v4
with:
path: ${{ github.event.repository.name }}
- name: Install package dependencies 📄
run: |
print(Sys.getenv("PATH"))
print(getwd("."))
if (file.exists(Sys.getenv("PATH"))) {
yaml::yaml.load(readLines(Sys.getenv("PATH")))$dependencies |>
sapply(function(x) x$repo) |>
pak::pak(dependencies = TRUE, ask = FALSE, upgrade = FALSE)
}
shell: Rscript {0}
# working-directory: ${{ github.event.repository.name }}
env:
PATH: "dependencies.yml"