Skip to content

CRAN synchronization #10516

CRAN synchronization

CRAN synchronization #10516

Workflow file for this run

on:
push:
paths:
- .github/workflows/update.yml
- update.R
schedule:
## Run twice an hour
- cron: '5,35 * * * *'
name: "CRAN synchronization"
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Configure Git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- uses: r-lib/actions/setup-r@v2
- name: Install R dependencies
run: install.packages("jsonlite")
shell: Rscript {0}
- name: Refresh packages.json
run: |
git fetch --all
git pull
Rscript update.R
mapfile -t pkgs < <(grep -F package packages.json)
echo "Number of CRANhaven packages: ${#pkgs[@]}"
- name: Commit and Push Changes
run: |
git add packages.json
git commit -m "Synchronized with CRAN" || echo "No changes to commit"
git push