Skip to content

packages

packages #768

Workflow file for this run

name: packages
on:
workflow_dispatch:
schedule:
- cron: '30 * * * *'
jobs:
packages:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- name: Install R.
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install helper R package.
run: |
install.packages(
pkgs = "multiverse.internals",
repos = c("https://cloud.r-project.org", "https://community.r-multiverse.org"),
type = "binary"
)
shell: Rscript {0}
- name: Check out staging universe.
uses: actions/checkout@v4
- name: Check community universe.
uses: actions/checkout@v4
with:
repository: '${{ github.repository_owner }}/community'
path: 'community'
- name: Update staging packages.
run: |
multiverse.internals::update_staging(
path_staging = getwd(),
path_community = "community",
repo_community = "https://community.r-multiverse.org"
)
shell: Rscript {0}
- name: Commit and push changes.
run: |
git add packages.json
if [ -f removing.json ]; then
git add removing.json
fi
if git diff --quiet && git diff --staged --quiet; then
echo "No changes to commit."
else
git config --global user.name github-actions
git config --global user.email actions@github.com
git commit -m "Update staging packages"
git push -u origin main
fi