Skip to content

Generate Definitions #677

Generate Definitions

Generate Definitions #677

name: Generate Definitions
on:
schedule: [{ cron: '0 0 * * *' }] # every day
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- run: npm ci
- run: npm run scrape-definitions
- run: npm run lint:lts -- --fix
continue-on-error: true
- run: npm run commit-definitions
- id: log
run: |
{
echo 'message<<EOF'
git log --format='- %s' --reverse ${{github.sha}}..
echo EOF
} >> "$GITHUB_OUTPUT"
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: latest-scraped-definitions
title: 'Scraped latest definitions'
body: ${{ steps.log.outputs.message }}