From c9e1212a0729d020db686509af64edca33ee2d46 Mon Sep 17 00:00:00 2001 From: zdz2101 Date: Thu, 14 May 2026 10:53:09 -0700 Subject: [PATCH 1/3] fix: install workr in manifest workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/manifest.yaml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/manifest.yaml b/.github/workflows/manifest.yaml index dc7b57a..4cf9385 100644 --- a/.github/workflows/manifest.yaml +++ b/.github/workflows/manifest.yaml @@ -47,13 +47,12 @@ jobs: with: fetch-depth: 0 - - name: Checkout workr R sources + - name: Checkout workr package source uses: actions/checkout@v4 with: repository: Gilead-BioStats/workr - ref: dev + ref: ${{ github.workflow_sha }} path: _workr - sparse-checkout: R - name: Read packages.yaml from manifest branch run: | @@ -77,19 +76,17 @@ jobs: with: r-version: '4.4' - - name: Install R dependencies + - name: Install workr package run: | - install.packages(c("base64enc", "yaml")) + install.packages("pak") + pak::local_install("_workr", dependencies = TRUE, upgrade = FALSE, ask = FALSE) shell: Rscript {0} - name: Create manifest env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - # Source R files (workr checkout or local) - r_dir <- if (dir.exists("_workr/R")) "_workr/R" else "R" - r_files <- list.files(r_dir, pattern = "\\.R$", full.names = TRUE) - for (f in r_files) source(f) + library(workr) # Read package list from packages.yaml config <- yaml::read_yaml("/tmp/packages.yaml") From 299c523989fac92f6fdc71e6d2ae76d08b9bed04 Mon Sep 17 00:00:00 2001 From: zdz2101 Date: Thu, 14 May 2026 11:24:13 -0700 Subject: [PATCH 2/3] fix: install only hard dependencies for manifest workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/manifest.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/manifest.yaml b/.github/workflows/manifest.yaml index 4cf9385..926a7f4 100644 --- a/.github/workflows/manifest.yaml +++ b/.github/workflows/manifest.yaml @@ -79,15 +79,18 @@ jobs: - name: Install workr package run: | install.packages("pak") - pak::local_install("_workr", dependencies = TRUE, upgrade = FALSE, ask = FALSE) + pak::local_install( + "_workr", + dependencies = c("Depends", "Imports", "LinkingTo"), + upgrade = FALSE, + ask = FALSE + ) shell: Rscript {0} - name: Create manifest env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - library(workr) - # Read package list from packages.yaml config <- yaml::read_yaml("/tmp/packages.yaml") pkglist <- config$packages @@ -102,7 +105,7 @@ jobs: pkg_branch_input <- "${{ inputs.pkg_branch }}" pkg_branch <- if (nchar(trimws(pkg_branch_input)) > 0) trimws(pkg_branch_input) else NULL - pkgManifest( + workr::pkgManifest( path = "manifest_output", packageList = pkglist, branch = pkg_branch From afedb572ef4c291dd50f053e73f6ce389d9c3ec1 Mon Sep 17 00:00:00 2001 From: zdz2101 Date: Thu, 14 May 2026 11:28:32 -0700 Subject: [PATCH 3/3] fix: use pak local_install hard-dependency mode Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/manifest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manifest.yaml b/.github/workflows/manifest.yaml index 926a7f4..593334d 100644 --- a/.github/workflows/manifest.yaml +++ b/.github/workflows/manifest.yaml @@ -81,7 +81,7 @@ jobs: install.packages("pak") pak::local_install( "_workr", - dependencies = c("Depends", "Imports", "LinkingTo"), + dependencies = NA, upgrade = FALSE, ask = FALSE )