Introduce a CI for license header check
Add license header check to CI pipeline using `apache/skywalking-eyes` for github action. Signed-off-by: elomscansio <163124154+elomscansio@users.noreply.github.com>
This commit is contained in:
parent
f1ce681f45
commit
5ef2c6680d
27
.github/workflows/license.yml
vendored
Normal file
27
.github/workflows/license.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: license
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
push:
|
||||
branches:
|
||||
- base
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
check-license:
|
||||
name: Check License
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 3
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check License Header - Rust
|
||||
uses: apache/skywalking-eyes@v0.3.0
|
||||
with:
|
||||
config: .licenserc.rust.yaml
|
||||
|
||||
- name: Check License Header - Python
|
||||
uses: apache/skywalking-eyes@v0.3.0
|
||||
with:
|
||||
config: .licenserc.python.yaml
|
24
.licenserc.python.yaml
Normal file
24
.licenserc.python.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
header:
|
||||
license:
|
||||
content: |
|
||||
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
paths:
|
||||
- 'rust/src/python/*'
|
||||
|
||||
paths-ignore:
|
||||
- 'target'
|
||||
- '**/*.toml'
|
||||
- '**/*.lock'
|
||||
- '**/*.mod'
|
||||
- '**/*.sum'
|
||||
- '**/*.in'
|
||||
- '**/*.yml'
|
||||
- '**/*.md'
|
||||
- 'CHANGELOG'
|
||||
- 'LICENSE*'
|
||||
- 'LICENSE'
|
||||
- '.gitignore'
|
||||
- '**/*.txt'
|
||||
|
||||
comment: on-failure
|
25
.licenserc.rust.yaml
Normal file
25
.licenserc.rust.yaml
Normal file
@ -0,0 +1,25 @@
|
||||
header:
|
||||
license:
|
||||
content: |
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
paths:
|
||||
- 'rust/src/*'
|
||||
|
||||
paths-ignore:
|
||||
- 'target'
|
||||
- '**/*.py'
|
||||
- '**/*.mod'
|
||||
- '**/*.sum'
|
||||
- '**/*.in'
|
||||
- '**/*.toml'
|
||||
- '**/*.lock'
|
||||
- '**/*.yml'
|
||||
- '**/*.md'
|
||||
- 'CHANGELOG'
|
||||
- 'LICENSE*'
|
||||
- 'LICENSE'
|
||||
- '.gitignore'
|
||||
- '**/*.txt'
|
||||
|
||||
comment: on-failure
|
Loading…
x
Reference in New Issue
Block a user