Github action failing for setup-r-dependencies

80 views Asked by At

I am trying to use this pkgdown.yml workflow from r-lib/actions and it started failing on the step setup-r-dependencies@v2.
I think it related to this commit to pak that was then released with version 0.7.1 last week (compare versions).
I don't know if this is a bug I should report to r-lib/pak or r-lib/actions or something I can resolve here.
Any help is appreciated.

on:
  push:
    branches:
      - main
  workflow_dispatch:

jobs:
  pkgdown:
    runs-on: self-hosted
    container: ...

    env:
      GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
      R_KEEP_PKG_SOURCE: yes

    permissions:
      contents: write

    steps:
      - name: Install Required Packages
        run: apt-get update && apt-get install -y gdebi-core pandoc

      - uses: actions/checkout@v1
        
      - uses: r-lib/actions/setup-renv@v2

      - uses: r-lib/actions/setup-r-dependencies@v2   # <--- fails here
        with:
          extra-packages: any::pkgdown, local::.
          needs: website
  Error: 
  ! error in pak subprocess
  Caused by error: 
  ! Could not solve package dependencies:
  * deps::.: ! pkgdepends resolution error for deps::..
  Caused by error: 
  ! Could not find R package in `.` or its parent directories.
  * any::pak=: ! pkgdepends resolution error for any::pak=.
  Caused by error: 
  ! missing value where TRUE/FALSE needed
  * local::.: ! pkgdepends resolution error for local::..
  Caused by error: 
  ! Could not find R package in `.` or its parent directories.
  ---
  Backtrace:
  1. pak::lockfile_create(c(deps, extra_deps), lockfile = ".github/pkg.lock", …
  2. pak:::remote(function(...) { …
  3. err$throw(res$error)
  ---
  Subprocess backtrace:
  1. base::withCallingHandlers(cli_message = function(msg) { …
  2. get("lockfile_create_internal", asNamespace("pak"))(...)
  3. prop$stop_for_solution_error()
  4. private$plan$stop_for_solve_error()
  5. pkgdepends:::pkgplan_stop_for_solve_error(self, private)
  6. base::throw(new_error("Could not solve package dependencies:\n", msg, …
  7. | base::signalCondition(cond)
  8. global (function (e) …
  Execution halted
0

There are 0 answers