File tree Expand file tree Collapse file tree 2 files changed +59
-8
lines changed Expand file tree Collapse file tree 2 files changed +59
-8
lines changed Original file line number Diff line number Diff line change 43
43
- run : yarn lint --no-fix
44
44
45
45
- run : yarn test
46
-
47
- - uses : taiki-e/install-action@v2
48
- with :
49
-
50
-
51
- - run : |
52
- yarn generate:licenses:ci
53
- git diff --exit-code
Original file line number Diff line number Diff line change
1
+ name : Licenses
2
+
3
+ on :
4
+ push :
5
+ paths :
6
+ - parser/Cargo.lock
7
+ - .github/workflows/licenses.yml
8
+ pull_request :
9
+ paths :
10
+ - parser/Cargo.lock
11
+ - .github/workflows/licenses.yml
12
+
13
+ permissions :
14
+ contents : write
15
+
16
+ jobs :
17
+ update-licenses :
18
+ runs-on : ubuntu-latest
19
+
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+
23
+ - run : corepack enable
24
+
25
+ - uses : actions/setup-node@v4
26
+ with :
27
+ node-version : 18
28
+ cache : yarn
29
+
30
+ - uses : actions/cache@v4
31
+ with :
32
+ path : |
33
+ ~/.cargo/bin/
34
+ ~/.cargo/registry/index/
35
+ ~/.cargo/registry/cache/
36
+ ~/.cargo/git/db/
37
+ parser/target/
38
+ key : ${{ runner.os }}-cargo-v1-${{ hashFiles('**/Cargo.lock') }}
39
+ restore-keys : |
40
+ ${{ runner.os }}-cargo-
41
+
42
+ - run : yarn
43
+
44
+ - uses : taiki-e/install-action@v2
45
+ with :
46
+
47
+
48
+ - run : |
49
+ yarn generate:licenses:ci
50
+
51
+ if git diff --exit-code; then
52
+ echo "No changes in licenses"
53
+ else
54
+ git config user.name "github-actions[bot]"
55
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
56
+ git add THIRD-PARTY-LICENSES.html
57
+ git commit -m "chore: update third-party-licenses"
58
+ git push
59
+ fi
You can’t perform that action at this time.
0 commit comments