-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.29 KB
/
third_party_notices_check.yml
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
name: Update Third Party Notices
on:
workflow_call:
secrets:
BOT_REPO_SCOPED_TOKEN:
required: true
jobs:
license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.BOT_REPO_SCOPED_TOKEN }}
- uses: actions/[email protected]
with:
node-version: 20.x
registry-url: "https://registry.npmjs.org"
- name: Install pnpm
uses: pnpm/[email protected]
- name: Global install generate-license-file
run: pnpm add -g generate-license-file
- name: Install packages
run: pnpm i --ignore-scripts
- name: Generate package licenses
run: pnpm run generate-notices
- name: Update THIRD-PARTY-NOTICES
id: push-changes
uses: EndBug/add-and-commit@v9
with:
message: "Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check"
push: true
default_author: github_actions
- name: Fail job if push changes
if: steps.push-changes.outputs.pushed == 'true'
uses: actions/github-script@v3
with:
script: |
core.setFailed('THIRD-PARTY-NOTICES were updated. A new commit was pushed.')