Skip to content

add dependecies workflow #3

add dependecies workflow

add dependecies workflow #3

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: |
if (file.exists("./dependencies.yml")) {
yaml::yaml.load(readLines("./dependencies.yml"))$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"