Skip to content

Commit 6576959

Browse files
committed
Use reusable armada workflow for frontend deps
1 parent b289d29 commit 6576959

2 files changed

Lines changed: 20 additions & 76 deletions

File tree

.github/workflows/monthly_npm_dependency_update.yml

Lines changed: 10 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,17 @@ on:
55
- cron: "0 8 1 * *" # 08:00 UTC on the 1st of every month
66
workflow_dispatch:
77

8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
812
jobs:
9-
npm-update:
10-
runs-on: ubuntu-latest
13+
update:
1114
permissions:
1215
contents: write
1316
pull-requests: write
14-
defaults:
15-
run:
16-
working-directory: frontend
17-
steps:
18-
- name: Checkout
19-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6
20-
with:
21-
persist-credentials: false
22-
23-
- name: Setup Node.js
24-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f #v6
25-
with:
26-
node-version: 24
27-
cache: npm
28-
cache-dependency-path: frontend/package-lock.json
29-
30-
- name: Update npm to support minimumReleaseAge
31-
run: npm install -g npm@11.10.0
32-
33-
- name: Update npm packages
34-
run: npm update
35-
36-
- name: Create Pull Request
37-
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 #v8
38-
with:
39-
commit-message: "GHA: Monthly npm dependency update"
40-
title: Monthly npm dependency update
41-
body: |
42-
- Monthly update of npm dependencies
43-
- Only packages released more than 7 days ago are included (enforced via `min-release-age=7` in `.npmrc`)
44-
45-
Auto-generated by [create-pull-request][1]
46-
47-
[1]: https://github.com/peter-evans/create-pull-request
48-
branch: monthly-npm-dependency-update
49-
labels: automated-pr
50-
delete-branch: true
17+
uses: equinor/armada/.github/workflows/npm_dependency_update_and_create_pr.yml@main
18+
with:
19+
working-directory: frontend
20+
node-version: "24"
21+
operation: update

.github/workflows/upgrade_package_lock_and_create_PR.yml

Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,19 @@ on:
66
- main
77

88
schedule:
9-
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
10-
# In a public repository, scheduled workflows are automatically disabled when no
11-
# repository activity has occurred in 60 days
129
- cron: "5 6 * * 1-5" # At 06:05 on every day-of-week from Monday through Friday
1310

11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
1415
jobs:
15-
npm-audit-fix:
16-
runs-on: ubuntu-latest
16+
audit-fix:
1717
permissions:
1818
contents: write
1919
pull-requests: write
20-
defaults:
21-
run:
22-
working-directory: frontend
23-
steps:
24-
- name: Checkout code
25-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6
26-
27-
- name: Setup Node.js
28-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f #v6
29-
with:
30-
node-version: 24
31-
cache: npm
32-
cache-dependency-path: frontend/package-lock.json
33-
34-
- name: Update vulnerable node packages
35-
run: |
36-
npm audit fix
37-
38-
- name: Create Pull Request
39-
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 #v8
40-
with:
41-
commit-message: "GHA: Update vulnerable node dependencies"
42-
title: Update vulnerable node dependencies
43-
body: |
44-
- Dependency node updates
45-
46-
Auto-generated by [create-pull-request][1]
47-
48-
[1]: https://github.com/peter-evans/create-pull-request
49-
branch: update-node-dependencies
50-
labels: automated-pr
51-
delete-branch: true
20+
uses: equinor/armada/.github/workflows/npm_dependency_update_and_create_pr.yml@main
21+
with:
22+
working-directory: frontend
23+
node-version: "24"
24+
operation: audit-fix

0 commit comments

Comments
 (0)