Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -77,20 +76,21 @@ 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 = NA,
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)

# Read package list from packages.yaml
config <- yaml::read_yaml("/tmp/packages.yaml")
pkglist <- config$packages
Expand All @@ -105,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
Expand Down
Loading