Generate Definitions #673
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: 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 }} |