Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion inst/templates/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 18 additions & 2 deletions inst/templates/workflows/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
Loading