Skip to content

Commit 643680e

Browse files
committed
chore(CI): Updating npm-audit-fix.yml workflow from template
Signed-off-by: Nextcloud bot <[email protected]>
1 parent 6d0d75c commit 643680e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/npm-audit-fix.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
# At 2:30 on Sundays
1515
- cron: '30 2 * * 0'
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
build:
1922
runs-on: ubuntu-latest
@@ -27,9 +30,12 @@ jobs:
2730

2831
steps:
2932
- name: Checkout
30-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
33+
id: checkout
34+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3135
with:
36+
persist-credentials: false
3237
ref: ${{ matrix.branches }}
38+
continue-on-error: true
3339

3440
- name: Read package.json node and npm engines version
3541
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -39,7 +45,7 @@ jobs:
3945
fallbackNpm: '^10'
4046

4147
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
42-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
48+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
4349
with:
4450
node-version: ${{ steps.versions.outputs.nodeVersion }}
4551

@@ -51,16 +57,16 @@ jobs:
5157
uses: nextcloud-libraries/npm-audit-action@2a60bd2e79cc77f2cc4d9a3fe40f1a69896f3a87 # v0.1.0
5258

5359
- name: Run npm ci and npm run build
54-
if: always()
60+
if: steps.checkout.outcome == 'success'
5561
env:
5662
CYPRESS_INSTALL_BINARY: 0
5763
run: |
5864
npm ci
5965
npm run build --if-present
6066
6167
- name: Create Pull Request
62-
if: always()
63-
uses: peter-evans/create-pull-request@4320041ed380b20e97d388d56a7fb4f9b8c20e79 # v7.0.0
68+
if: steps.checkout.outcome == 'success'
69+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
6470
with:
6571
token: ${{ secrets.COMMAND_BOT_PAT }}
6672
commit-message: 'fix(deps): Fix npm audit'

0 commit comments

Comments
 (0)