npm update #105
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: npm update | |
on: workflow_dispatch | |
jobs: | |
npm-update-root: | |
name: npm update root | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4.0.4 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache node deps | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-deps | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
- name: npm update | |
run: | | |
npx npm-check-updates -u -x typescript,zone.js | |
npm install -f | |
npm update | |
npm install | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: '${{ secrets.GH_PAT }}' | |
add-paths: 'package*.json' | |
commit-message: npm update (root) | |
title: npm update (root) | |
branch: npm-update-root | |
author: 'github-actions <github-actions@github.com>' | |
npm-update-project: | |
name: npm update project | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4.0.4 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache node deps | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-deps | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
- name: npm update | |
working-directory: projects/ngx-kel-agent/ | |
run: | | |
npx npm-check-updates -u | |
npm install -f | |
npm update | |
npm install | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: '${{ secrets.GH_PAT }}' | |
add-paths: 'projects/ngx-kel-agent/package*.json' | |
commit-message: npm update (project) | |
title: npm update (project) | |
branch: npm-update-project | |
author: 'github-actions <github-actions@github.com>' |