Download CRAN PACKAGES #116
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: 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 |