Skip to content

build-packages-file #41470

build-packages-file

build-packages-file #41470

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