Skip to content

Detect outdated Node dependencies #190

Detect outdated Node dependencies

Detect outdated Node dependencies #190

name: Detect outdated Node dependencies
on:
schedule:
- cron: '0 16 * * *' # Every day 4pm
workflow_dispatch:
# NOTE: This will drop all permissions from GITHUB_TOKEN except metadata read,
# and then (re)add the ones listed below:
permissions:
contents: write
pull-requests: write
jobs:
npm_detect_outdated:
name: Detect outdated Node dependencies
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 23
- name: Check for outdated Node dependencies
run: |-
set -x
cd jawanndenn/frontend
npm update
git diff || true
- name: Create pull request from changes (if any)
id: create-pull-request
uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11
with:
author: 'npm <[email protected]>'
base: master
body: |-
For your consideration.
:warning: Please **CLOSE AND RE-OPEN** this pull request so that [further workflow runs get triggered](https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs) for this pull request.
branch: npm-autoupdate
commit-message: "npm: Autoupdate"
delete-branch: true
draft: true
labels: enhancement
title: "npm: Autoupdate"
- name: Log pull request URL
if: "${{ steps.create-pull-request.outputs.pull-request-url }}"
run: |
echo "Pull request URL is: ${{ steps.create-pull-request.outputs.pull-request-url }}"