Skip to content

Generate Definitions #10089

Generate Definitions

Generate Definitions #10089

name: Generate Definitions
on:
schedule: [{ cron: '0 */4 * * *' }] # every 4 hrs: https://crontab.guru/#0_*/4_*_*_*
workflow_dispatch:
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run scrape-definitions
- run: npm run lint:lts -- --fix
continue-on-error: true
- run: npm run commit-definitions
env:
GIT_AUTHOR_NAME: 'nodenv bot'
GIT_AUTHOR_EMAIL: '[email protected]'
GIT_COMMITTER_NAME: 'nodenv bot'
GIT_COMMITTER_EMAIL: '[email protected]'
- id: log
run: |
msg=$(git log --format='- %s' --reverse ${{github.sha}}..)
echo "::set-output name=message::${msg//$'\n'/'%0A'}"
- uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.BOT_TOKEN }}
branch: latest-scraped-definitions
title: 'Scraped latest definitions'
body: ${{ steps.log.outputs.message }}