Skip to content

Periodic update

Periodic update #26

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 }}