-
Notifications
You must be signed in to change notification settings - Fork 6
66 lines (56 loc) · 1.9 KB
/
license.yaml
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
name: License check
on:
push:
branches:
- main
pull_request:
types: [ labeled, opened, reopened, synchronize ]
env:
GO_VERSION: 1.19
GOFLAGS: -mod=readonly
jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'licensei')
name: Build project
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Cache build dependencies
id: cache-build-dependencies
uses: actions/cache@v3
with:
path: bin/
key: build-deps-v2-{{ hashFiles('common.mk') }}
restore-keys: |
build-deps-v2-
- name: Cache licenses
id: cache-licenses
uses: actions/cache@v3
with:
path: |
.licensei.cache
components/heimdall/.licensei.cache
components/echo-server/.licensei.cache
components/bifrost/.licensei.cache
experimental/mobile/.licensei.cache
experimental/java/.licensei.cache
key: licensei-v2-${{ hashFiles('go.sum') }}
restore-keys: |
licensei-v2-
- name: Download license information for dependencies
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Note: this is required for licensei auth in steps to avoid rate-limiting.
run: make license-cache-all
- name: List license information for dependencies
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Note: this is required for licensei auth in steps to avoid rate-limiting.
run: ./bin/licensei list
- name: Check dependency licenses
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Note: this is required for licensei auth in steps to avoid rate-limiting.
run: make license-check-all