Skip to content

Definitions

Definitions #692

Workflow file for this run

name: Definitions
on:
schedule: [{cron: '0 */6 * * *'}] # 6hrly https://crontab.guru/#0_*/6_*_*_*
workflow_dispatch:
permissions: {contents: read}
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- 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: ${{ vars.NODENV_BOT_NAME }}
GIT_AUTHOR_EMAIL: ${{ vars.NODENV_BOT_EMAIL }}
GIT_COMMITTER_NAME: ${{ vars.GHA_BOT_NAME }}
GIT_COMMITTER_EMAIL: ${{ vars.GHA_BOT_EMAIL }}
- 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@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
token: ${{ secrets.BOT_TOKEN }}
branch: latest-scraped-definitions
title: 'Scraped latest definitions'
body: ${{ steps.log.outputs.message }}
lts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: npm ci
- run: npm run lint:lts -- --fix
- if: failure()
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
token: ${{ secrets.BOT_TOKEN }}
committer: 'nodenv bot <[email protected]>'
commit-message: 'Add LTS warning messages'
branch: lts-warning-message
title: 'Adds/Updates LTS warning messages'
body: |-
[![node lts schedule](https://raw.githubusercontent.com/nodejs/Release/main/schedule.svg)](https://github.com/nodejs/Release)
> Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action