Npm update #512
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: | |
inputs: | |
skip_audit: | |
required: false | |
default: false | |
type: boolean | |
schedule: | |
- cron: '0 2 * * *' | |
jobs: | |
Npm-Update: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "web-ci" | |
- run: npm ci | |
- run: npx npm-check-updates -u -t minor | |
- run: npm install | |
- run: npm audit fix | |
if: ${{ !inputs.skip_audit }} | |
- run: npm test | |
- run: git add package.json package-lock.json | |
- name: Commit changes | |
run: | | |
# Only commit if there are changes | |
if ! git diff-index --quiet HEAD; then | |
git commit -m 'chore(deps): Update packages - minor by github workflow' | |
fi | |
- run: git push |