Skip to content

Commit

Permalink
Merge pull request #892 from nodenv/scrape-workflow
Browse files Browse the repository at this point in the history
scrape workflow
  • Loading branch information
jasonkarns authored May 30, 2024
2 parents 96c8e06 + 12fcd07 commit 8bdd6b3
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 58 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/definitions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Definitions
on:
schedule: [{cron: '0 */6 * * *'}] # 6hrly https://crontab.guru/#0_*/6_*_*_*
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: ${{ 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@v6
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@v4
- run: npm ci
- run: npm run lint:lts -- --fix
- if: failure()
uses: peter-evans/create-pull-request@v6
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
24 changes: 0 additions & 24 deletions .github/workflows/fix-lts.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/scrape-definitions.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- if: ${{ env.release }}
run: npm version patch
env:
GIT_AUTHOR_NAME: "nodenv[bot]"
GIT_AUTHOR_EMAIL: "[email protected]"
GIT_COMMITTER_NAME: "github-actions[bot]"
GIT_COMMITTER_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
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 }}

0 comments on commit 8bdd6b3

Please sign in to comment.