Add automated license verification using GitHub Action (#2)
diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml
new file mode 100644
index 0000000..6a0dfe6
--- /dev/null
+++ b/.github/workflows/license.yml
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+name: License
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+
+jobs:
+ license:
+ name: license
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ submodules: 'recursive'
+ - name: Check License Header
+ uses: apache/skywalking-eyes/header/@d299844e334855087f18ae1fe3c81ae8d22bc282
+ with:
+ config: .licenserc.yaml
diff --git a/.licenserc.yaml b/.licenserc.yaml
new file mode 100644
index 0000000..7737bc2
--- /dev/null
+++ b/.licenserc.yaml
@@ -0,0 +1,46 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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: Apache Software Foundation
+
+ paths-ignore:
+ - '.github/ISSUE_TEMPLATE'
+ - '.github/PULL_REQUEST_TEMPLATE'
+ - '**/.gitignore'
+ - '.gitmodules'
+ - '.lift'
+ - 'docker/.env'
+ - 'dist'
+ - 'licenses'
+ - 'dist-material/release-docs'
+ - '**/*.md'
+ - '**/*.json'
+ - '**/*.ftl'
+ - '**/target/**'
+ - '**/*.iml'
+ - '**/*.ini'
+ - '**/*.crt'
+ - '**/*.pem'
+ - '**/*.txt'
+ - 'LICENSE'
+ - 'NOTICE'
+
+ comment: on-failure