.github/workflows/update.yml #6
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
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * 1' | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Cache packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: pkgs | |
| key: pkgs | |
| - name: Setup R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: 'release' | |
| use-public-rspm: true | |
| - name: Install R dependencies | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| - name: Update | |
| run: | | |
| mkdir -p pkgs && rm -rf dirs | |
| Rscript R/download.R | |
| Rscript R/list.R | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add lists | |
| git diff-index --quiet HEAD || git commit -m "update lists" | |
| git push |