You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2021/09/24 04:45:35 UTC

[incubator-inlong] branch master updated: [INLONG-1571][CI] Add check license header workflow (#1572)

This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 385b2a9  [INLONG-1571][CI] Add check license header workflow (#1572)
385b2a9 is described below

commit 385b2a9a29a4e50fcba7e7e84b3938a7510f9465
Author: 深刻 <ts...@qq.com>
AuthorDate: Fri Sep 24 12:45:30 2021 +0800

    [INLONG-1571][CI] Add check license header workflow (#1572)
---
 .github/workflows/ci_check_license.yml | 40 ++++++++++++++++
 .licenserc.yaml                        | 87 ++++++++++++++++++++++++++++++++++
 2 files changed, 127 insertions(+)

diff --git a/.github/workflows/ci_check_license.yml b/.github/workflows/ci_check_license.yml
new file mode 100644
index 0000000..321606e
--- /dev/null
+++ b/.github/workflows/ci_check_license.yml
@@ -0,0 +1,40 @@
+#
+# 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: InLong Check License Header
+
+on:
+  push:
+    branches: [ master, 'INLONG-*' ]
+  pull_request:
+    branches: [ master, 'INLONG-*' ]
+
+jobs:
+  build:
+    name: Check License Header
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - name: Check License Header
+        uses: apache/skywalking-eyes@ed749b83e23f10eae9c379870c3d5ed45ce4e67a
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          log: info
+          config: .licenserc.yaml
diff --git a/.licenserc.yaml b/.licenserc.yaml
new file mode 100644
index 0000000..2e4b4ab
--- /dev/null
+++ b/.licenserc.yaml
@@ -0,0 +1,87 @@
+#
+# 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:
+    # Exclude license copies
+    - 'licenses/**'
+
+    # Exclude generated content
+    - 'LICENSE'
+    - 'NOTICE'
+    - 'DISCLAIMER-WIP'
+    - 'codestyle/**'
+
+    # Documents
+    - '**/*.md'
+    - '**/*.MD'
+    - '**/*.txt'
+    - '**/*.key'
+    - '**/*.crt'
+    - '**/*.pem'
+    - '**/*.json'
+    - '**/*.csv'
+    - '**/*.log'
+    - '**/logs/**'
+    - '**/docs/**'
+
+    # Web configure files
+    - '**/.env'
+    - '**/.env.production'
+    - '**/.eslintignore'
+    - '**/.eslintrc'
+    - '**/.headerignore'
+    - '**/.prettierrc'
+    - '**/.stylelintrc'
+    - '**/build/**'
+    - '**/node_modules/**'
+
+    # Git files
+    - '**/.gitignore'
+    - '**/.gitmodules'
+    - '**/.git/**'
+
+    # GitHub
+    - '**/.github/**'
+
+    # Intellij IDEA
+    - '**/*.iml'
+    - '**/.idea/**'
+
+    # Build targets
+    - '**/target/**'
+    - '**/out/**'
+    - '**/dist/**'
+
+    # Test case: certificates used in test cases
+    - '**/tubemq-core/src/test/resources/*.keystore'
+
+    # Test case: temporary data for test cases
+    - '**/AgentBaseTestsHelper/**'
+
+    # Referenced 3rd codes
+    - '**/resources/assets/lib/**'
+    - '**/resources/assets/public/**'
+    - '**/tubemq-client-cpp/src/any.h'
+    - '**/tubemq-client-cpp/src/buffer.h'
+    - '**/tubemq-client-cpp/third_party/**'
+
+  comment: on-failure