From f520dda345c52280e97c1767d65f24e1d507df78 Mon Sep 17 00:00:00 2001 From: Max Xu Date: Mon, 20 Mar 2023 14:02:35 +0800 Subject: [PATCH] ci: add license header checker (#12) Signed-off-by: Max Xu --- .github/workflows/ci.yaml | 9 +++++++++ .licenserc.yaml | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .licenserc.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 69daea3..0390ac6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,6 +22,15 @@ on: - '*' jobs: + license-check: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Check license header + uses: apache/skywalking-eyes@e1a02359b239bd28de3f6d35fdc870250fa513d5 + lint: runs-on: ubuntu-latest steps: diff --git a/.licenserc.yaml b/.licenserc.yaml new file mode 100644 index 0000000..6f4cee6 --- /dev/null +++ b/.licenserc.yaml @@ -0,0 +1,28 @@ +# Copyright 2023 StreamNative, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +header: + license: + spdx-id: Apache-2.0 + copyright-owner: StreamNative, Inc. + copyright-year: '2023' + software-name: pulsar-admin-go + + paths-ignore: + - '**/go.mod' + - '**/go.sum' + - 'LICENSE' + - 'NOTICE' + + comment: on-failure