Periodic update #22
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: Check & update repository periodically | |
| run-name: Periodic update | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 1 * * *" | |
| jobs: | |
| periodic-update: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Run update script | |
| working-directory: ./scripts | |
| run: | | |
| npm ci | |
| npm run update-from-live | |
| - name: Commit on change | |
| run: | | |
| if ! git diff --quiet registry-data; then | |
| git config --local user.name "Registry Bot" | |
| git config --local user.email "identifiers-org@ebi.ac.uk" | |
| git add registry-data/ | |
| git commit -m 'Update repository from live dataset' | |
| fi | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.PUSH_PAT }} |