Skip to content

containers: update NodeJS to 20.12.0 #362

containers: update NodeJS to 20.12.0

containers: update NodeJS to 20.12.0 #362

name: Update containers dependencies
on:
# Run on push and PR too
push: {}
pull_request: {}
schedule:
# Run the check monthly
- cron: '0 0 1 * *'
jobs:
nodejs:
name: Update NodeJS version
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run updater
# This step will emit a version number if an update is found
id: updater
run: ./containers/check-node-updates.sh
- name: Generate app token to create PR
uses: tibdex/github-app-token@v1.8.0
if: github.event_name == 'schedule' || (github.event_name == 'push' && github.ref_name == 'main')
id: generate-token
with:
app_id: ${{ secrets.NODE_APP_ID }}
private_key: ${{ secrets.NODE_APP_KEY }}
- name: Create PR if needed (only on scheduled runs)
if: github.event_name == 'schedule' || (github.event_name == 'push' && github.ref_name == 'main')
uses: peter-evans/create-pull-request@v5.0.0
with:
commit-message: |
containers: update NodeJS to ${{ steps.updater.outputs.updated-to }}
delete-branch: true
title: |
containers: update NodeJS to ${{ steps.updater.outputs.updated-to }}
body: ''
token: ${{ steps.generate-token.outputs.token }}