File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # This workflow is provided via the organization template repository
2+ #
3+ # https://github.com/nextcloud/.github
4+ # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
6+ name : npm audit fix and compile
7+
8+ on :
9+ workflow_dispatch :
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+
15+ name : node
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
19+
20+ - name : Read package.json node and npm engines version
21+ uses : skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
22+ id : versions
23+ with :
24+ fallbackNode : ' ^16'
25+ fallbackNpm : ' ^7'
26+
27+ - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
28+ uses : actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
29+ with :
30+ node-version : ${{ steps.versions.outputs.nodeVersion }}
31+
32+ - name : Set up npm ${{ steps.versions.outputs.npmVersion }}
33+ run : npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
34+
35+ - name : Fix npm audit, run npm ci and npm run build
36+ run : |
37+ npm audit fix
38+ npm ci
39+ npm run build --if-present
40+
41+ - name : Create Pull Request
42+ uses : peter-evans/create-pull-request@18f7dc018cc2cd597073088f7c7591b9d1c02672 # v3
43+ with :
44+ token : ${{ secrets.COMMAND_BOT_PAT }}
45+ commit-message : " chore(deps): fix npm audit"
46+ committer :
GitHub <[email protected] > 47+ author :
nextcloud-command <[email protected] > 48+ signoff : true
49+ branch : automated/noid/${{ matrix.branches }}-fix-npm-audit
50+ title : " [${{ matrix.branches }}] Fix npm audit"
51+ body : |
52+ Auto-generated fix of npm audit
53+ labels : |
54+ dependencies
55+ 3. to review
You can’t perform that action at this time.
0 commit comments