-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 943 Bytes
/
Copy pathsync.yml
File metadata and controls
33 lines (31 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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 "enchufa2@users.noreply.github.com"
- 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