diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml new file mode 100644 index 00000000..449727be --- /dev/null +++ b/.github/workflows/license.yml @@ -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 diff --git a/.licenserc.python.yaml b/.licenserc.python.yaml new file mode 100644 index 00000000..a1e51a8e --- /dev/null +++ b/.licenserc.python.yaml @@ -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 \ No newline at end of file diff --git a/.licenserc.rust.yaml b/.licenserc.rust.yaml new file mode 100644 index 00000000..853d4768 --- /dev/null +++ b/.licenserc.rust.yaml @@ -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 \ No newline at end of file