From e11c653add37317d5af33f51572fdc6961811086 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Wed, 12 May 2021 16:41:07 +0300 Subject: [PATCH] check source files for license header Signed-off-by: Jari Kolehmainen --- .github/workflows/license-header.yml | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/license-header.yml diff --git a/.github/workflows/license-header.yml b/.github/workflows/license-header.yml new file mode 100644 index 0000000000..2ea86a11b4 --- /dev/null +++ b/.github/workflows/license-header.yml @@ -0,0 +1,41 @@ +name: license-header +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Golang + uses: actions/setup-go@v2 + - name: Install addlicense + run: | + export PATH=${PATH}:`go env GOPATH`/bin + go get -v -u github.com/google/addlicense + - name: Check license headers + run: | + set -e + export PATH=${PATH}:`go env GOPATH`/bin + + addlicense -check -l mit -c "OpenLens Authors" *.ts* + + addlicense -check -l mit -c "OpenLens Authors" src/common/**/*.ts* + addlicense -check -l mit -c "OpenLens Authors" src/common/**/*.?css + + addlicense -check -l mit -c "OpenLens Authors" src/main/**/*.ts* + addlicense -check -l mit -c "OpenLens Authors" src/main/**/*.?css + + addlicense -check -l mit -c "OpenLens Authors" src/renderer/**/*.ts* + addlicense -check -l mit -c "OpenLens Authors" src/renderer/**/*.?css + + addlicense -check -l mit -c "OpenLens Authors" src/extensions/**/*.ts* + addlicense -check -l mit -c "OpenLens Authors" src/extensions/**/*.?css + + addlicense -check -l mit -c "OpenLens Authors" extensions/**/*.ts* + addlicense -check -l mit -c "OpenLens Authors" extensions/**/*.?css