Skip to content

update

update #931

Workflow file for this run

name: update
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *'
jobs:
update:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install libglpk-dev
- name: Install R.
uses: r-lib/actions/setup-r@v2
with:
extra-repositories: https://community.r-multiverse.org
use-public-rspm: true
- name: Install helper R package.
run: install.packages("multiverse.internals")
shell: Rscript {0}
- name: Check out the status repository.
uses: actions/checkout@v4
- name: Check out the staging universe.
uses: actions/checkout@v4
with:
repository: '${{ github.repository_owner }}/staging'
path: 'source_staging'
- name: Check out the community universe.
uses: actions/checkout@v4
with:
repository: '${{ github.repository_owner }}/community'
path: 'source_community'
- name: Update package status
run: |
multiverse.internals::update_status(
path_status = getwd(),
path_staging = "source_staging",
path_community = "source_community",
repo_staging = "https://staging.r-multiverse.org",
repo_community = "https://community.r-multiverse.org"
)
shell: Rscript {0}
- name: Remove staging and community universe clones.
run: rm -rf source_staging source_community
- name: Commit and push changes.
run: |
git add staging community
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 [email protected]
git commit -m "Update package status"
git push -u origin main
fi