Skip to content

Download CRAN PACKAGES #116

Download CRAN PACKAGES

Download CRAN PACKAGES #116

name: Download CRAN PACKAGES
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
download:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download PACKAGES file
run: |
REPO_PATH="inst/repos/$(date -u '+%Y-%m-%d')/src/contrib"
mkdir -p $REPO_PATH
curl -fsSL https://cran.r-project.org/src/contrib/PACKAGES -o $REPO_PATH/PACKAGES
- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
DATE=$(date -u '+%Y-%m-%d')
git add .
git diff --cached --quiet || git commit -m "chore: add CRAN PACKAGES for $DATE"
git push