add license checker into CI (#1182)

This commit is contained in:
Jianbo Sun
2021-03-12 16:34:51 +08:00
committed by GitHub
parent ccc5826616
commit 99b8e4aba3
3 changed files with 88 additions and 0 deletions

26
.github/workflows/license.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: license
on:
push:
branches:
- master
- release-*
workflow_dispatch: {}
pull_request:
branches:
- master
- release-*
jobs:
license_check:
runs-on: ubuntu-latest
name: Check for unapproved licenses
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Install dependencies
run: gem install license_finder
- name: Run tests
run: license_finder --decisions_file .license/dependency_decisions.yml

19
.license/README.md Normal file
View File

@@ -0,0 +1,19 @@
# License Checker
Our license checker CI rely on https://github.com/pivotal/LicenseFinder.
## How to add a new license?
LicenseFinder is a ruby project, so make sure you have ruby installed.
### Install the tool
```shell
gem install license_finder
```
### Add a license
```shell
license_finder permitted_licenses add MIT --decisions_file .license/dependency_decisions.yml
```

View File

@@ -0,0 +1,43 @@
---
- - :permit
- MIT
- :who:
:why:
:versions: []
:when: 2021-03-12 07:35:34.645031000 Z
- - :permit
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2021-03-12 07:19:18.243194000 Z
- - :permit
- New BSD
- :who:
:why:
:versions: []
:when: 2021-03-12 07:19:28.540675000 Z
- - :permit
- Simplified BSD
- :who:
:why:
:versions: []
:when: 2021-03-12 07:20:01.774212000 Z
- - :permit
- Mozilla Public License 2.0
- :who:
:why:
:versions: []
:when: 2021-03-12 07:21:05.194536000 Z
- - :permit
- unknown
- :who:
:why:
:versions: []
:when: 2021-03-12 07:21:43.379269000 Z
- - :permit
- ISC
- :who:
:why:
:versions: []
:when: 2021-03-12 07:22:07.265966000 Z