Skip to content

Check for NodeJS updates #3

Check for NodeJS updates

Check for NodeJS updates #3

name: Check for NodeJS updates
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Run every week
schedule:
- cron: '43 5 * * 0'
env:
COMPANION_BRANCH: main
permissions:
contents: write
pull-requests: write
jobs:
update-nodejs:
if: ${{ github.repository_owner == 'bitfocus' }}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
ref: ${{ env.COMPANION_BRANCH }}
token: ${{ secrets.SYNC_MODULES_PAT }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
- name: Setup environment
run: |
corepack enable
yarn
- name: Run script
run: |
node tools/update_nodejs_versions.mjs
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: 'chore: update Node.js versions'
title: 'chore: update Node.js versions'
body: 'This PR updates the Node.js versions in the Companion.'
delete-branch: true
branch: 'chore/update-nodejs'
committer: 'Companion Bot <[email protected]>'
author: 'Companion Bot <[email protected]>'
add-paths: 'nodejs-versions.json'
token: ${{ secrets.SYNC_MODULES_PAT }}