-
Notifications
You must be signed in to change notification settings - Fork 3
81 lines (70 loc) · 2.2 KB
/
tpip.yml
File metadata and controls
81 lines (70 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: TPIP
on:
pull_request:
branches:
- main
paths:
- .github/workflows/tpip.yml
- docs/third-party-licenses.json
- docs/tpip-header.md
- scripts/tpip-reporter.ts
- package-lock.json
- docs/*
- scripts/update-tpip.ts
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
update-tpip:
name: Update TPIP Report
permissions:
contents: write
packages: read
actions: read
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
node-version-file: package.json
registry-url: https://npm.pkg.github.com
check-latest: false
package-manager-cache: false
- name: Install dependencies
env:
GITHUB_TOKEN: ${{ github.token }}
NODE_OPTIONS: --max-old-space-size=8192
run: npm ci
- name: Update TPIP excerpt
id: excerpt
run: |
npm run tpip:update
if git diff --exit-code docs/third-party-licenses.json > /dev/null; then
echo "update=0" >> $GITHUB_OUTPUT
else
echo "update=1" >> $GITHUB_OUTPUT
fi
- name: Update TPIP report
if: ${{ steps.excerpt.outputs.update == 1 }}
run: npm run tpip
- name: Commit Changes
if: ${{ steps.excerpt.outputs.update == 1 }}
uses: EndBug/add-and-commit@290ea2c423ad77ca9c62ae0f5b224379612c0321
with:
author_name: monty-bot
author_email: monty-bot@arm.com
message: "Update TPIP report [skip ci]"
add: |
docs/third-party-licenses.*