Weekly sync #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Weekly sync | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 1' | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: 'release' | |
- name: Configuration | |
run: | | |
git config --local user.name "Github Action" | |
git config --local user.email "[email protected]" | |
- name: Sync with CRAN | |
run: | | |
. /etc/os-release | |
RVER=$(Rscript -e 'cat(version$major, as.integer(version$minor), sep=".")') | |
REPO="https://rdatatable.r-universe.dev/bin/linux/$VERSION_CODENAME-x86_64/$RVER" | |
Rscript -e "install.packages('data.table', repos='$REPO')" | |
Rscript pkgdb-update.r | |
Rscript pkgdb-update.r | |
git add pkgdb.csv | |
git diff-index --quiet HEAD || git commit -m "update pkgdb" | |
git push |