From c7ac87095376a333f4a0468e2a26b51dbcd7d0bb Mon Sep 17 00:00:00 2001 From: Jon Harmon Date: Mon, 30 Mar 2026 14:27:45 -0500 Subject: [PATCH 1/2] chore: remove snapshots Snapshots require permissions that we don't have/want, evidently. --- .github/workflows/copilot-setup-steps.yml | 1 - inst/templates/workflows/copilot-setup-steps.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index ecd20df..d5dffcf 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -15,7 +15,6 @@ jobs: # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. copilot-setup-steps: runs-on: ubuntu-latest - snapshot: true permissions: contents: read diff --git a/inst/templates/workflows/copilot-setup-steps.yml b/inst/templates/workflows/copilot-setup-steps.yml index ff5a278..e299ee3 100644 --- a/inst/templates/workflows/copilot-setup-steps.yml +++ b/inst/templates/workflows/copilot-setup-steps.yml @@ -15,7 +15,6 @@ jobs: # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. copilot-setup-steps: runs-on: ubuntu-latest - snapshot: true permissions: contents: read From 64a1c52280fba53ccc77ef1d8131168fdd47d9e9 Mon Sep 17 00:00:00 2001 From: Jon Harmon Date: Mon, 30 Mar 2026 14:28:23 -0500 Subject: [PATCH 2/2] chore: update installable install action --- inst/templates/workflows/install/action.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/inst/templates/workflows/install/action.yml b/inst/templates/workflows/install/action.yml index d1537b7..e73dc55 100644 --- a/inst/templates/workflows/install/action.yml +++ b/inst/templates/workflows/install/action.yml @@ -39,13 +39,29 @@ runs: - if: inputs.use-container != 'true' uses: r-lib/actions/setup-pandoc@v2 - - if: inputs.use-container != 'true' - uses: r-lib/actions/setup-r@v2 + # Always run setup-r, even in containers. With install-r: false it + # skips the R download but still sets R_LIBS_USER, TZ, NOT_CRAN, etc. + # in GITHUB_ENV — the official way to align the environment for + # setup-r-dependencies and actions/cache. + - uses: r-lib/actions/setup-r@v2 with: + install-r: ${{ inputs.use-container != 'true' }} r-version: ${{ inputs.r-version }} http-user-agent: ${{ inputs.http-user-agent }} use-public-rspm: true + # In pre-warmed containers every package may already be in the system + # library, so nothing is ever written to R_LIBS_USER. Ensure the + # directory exists with a sentinel so the actions/cache glob matches + # and the "Path Validation Error" warning doesn't fire at cache-save. + - if: inputs.use-container == 'true' + name: Ensure R_LIBS_USER exists + shell: bash + run: | + lib="$(Rscript -e 'cat(Sys.getenv("R_LIBS_USER"))')" + mkdir -p "$lib" + touch "$lib/.keep" + - uses: r-lib/actions/setup-r-dependencies@v2 env: GITHUB_PAT: ${{ inputs.token }}