build-packages-file #43829
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-packages-file | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "25,55 * * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: ghcr.io/ropensci-org/makeregistry | |
env: | |
GITHUB_PAT: ${{ secrets.ANONYMOUS_PAT }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build packages.json | |
run: | | |
makeregistry::build_ropensci_packages_json() | |
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 config --global --add safe.directory /__w/roregistry/roregistry | |
git add packages.json | |
git commit -m 'packages.json updated' || exit 0 | |
git pull --rebase | |
git push |