Skip to content

Commit

Permalink
Override repositories used by pak (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
walkowif authored Sep 12, 2024
1 parent 28659a6 commit e7ed179
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,21 @@ runs:
shell: bash
run: rm utils.R

- name: Set repositories
run: |
OS_CODENAME=$(lsb_release --codename --short | tail)
cat > ${HOME}/.Rprofile <<EOF
options(
repos = c(
RSPM = "https://packagemanager.posit.co/cran/__linux__/${OS_CODENAME}/latest",
CRAN = "https://packagemanager.posit.co/cran/__linux__/${OS_CODENAME}/latest"
)
)
EOF
echo "Repositories written to ${HOME}/.Rprofile:"
cat ${HOME}/.Rprofile
shell: bash

- uses: r-lib/actions/setup-r-dependencies@v2
if: ${{ inputs.skip-install == 'false' }}
with:
Expand Down

0 comments on commit e7ed179

Please sign in to comment.