build-registry #1133
This file contains 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: build-registry | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'packages.json' | |
schedule: | |
- cron: "45 7 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_GRAPHQL_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPO_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: ropensci-org/makeregistry | |
- name: Build registry | |
run: | | |
makeregistry::make_registry() | |
shell: Rscript {0} | |
- name: push | |
if: success() && github.ref == 'refs/heads/gh-pages' | |
run: | | |
echo "pushing changes to github" | |
git config --global user.email "[email protected]" | |
git config --global user.name "ropenscibot" | |
git add registry.json raw_cm.json | |
git commit -m 'registry.json updated' || exit 0 | |
git pull --rebase | |
git push |