Definitions #609
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: 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- 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 <jason.karns+nodenv@github.com>' | |
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 |