Skip to content

Update npm dependencies #119

Update npm dependencies

Update npm dependencies #119

name: Update npm dependencies
on:
schedule:
- cron: '0 8 * * 1'
workflow_dispatch:
push:
branches:
- auto-npm-update
jobs:
update_deps:
name: Update dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup node version
uses: actions/setup-node@v4
with:
node-version: 20.6.1
- name: Install dependencies
run: npm install
- name: Update dependencies
run: npm run update-deps
- name: Report Status
if: always()
uses: ravsamhq/notify-slack-action@v1
with:
status: ${{ job.status }}
notification_title: 'GitHub action failed'
message_format: ':elmo-fire: *{workflow}* {status_message} in <{repo_url}|{repo}>'
notify_when: 'failure'
footer: 'Linked to Repo <{repo_url}|{repo}>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
- name: Create pull request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
branch: auto/update-npm-deps
delete-branch: true
committer: GitHub <[email protected]>
author: GitHub <[email protected]>
commit-message: Update npm dependencies
title: Update npm dependencies
body: >
Automated npm dependency updates generated by the
[Update npm dependencies](https://github.com/ministryofjustice/bichard7-next-audit-logging/actions/workflows/update-npm-deps.yml)
workflow.
- name: Check PR information
run: |
echo "PR #${{ steps.cpr.outputs.pull-request-number}}"
echo "${{ steps.cpr.outputs.pull-request-url }}"