From bb04201835f168f7a976cc0e0608bad19c68208a Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Tue, 5 Jan 2021 10:42:26 +0100 Subject: [PATCH] Add a license header check Signed-off-by: Stephen Kitt --- .github/workflows/linting.yml | 10 ++++++++++ .legal.json | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 .legal.json diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index beb73abf7c..0d92bcfc47 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -50,6 +50,16 @@ jobs: - name: Run golangci-lint run: make golangci-lint + headers: + name: License Headers + runs-on: ubuntu-latest + steps: + - name: Check out the repository + uses: actions/checkout@v2 + + - name: Check License Headers + uses: nilp0inter/search-legal-headers@v0.0.2 + markdown-link-check: name: Markdown Links (modified files) runs-on: ubuntu-latest diff --git a/.legal.json b/.legal.json new file mode 100644 index 0000000000..95021b3f3f --- /dev/null +++ b/.legal.json @@ -0,0 +1,4 @@ +{ + "**/*.go": "Licensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n", + "LICENSE": "Apache License" +}