diff --git a/.github/workflows/lint-documentation.yml b/.github/workflows/lint-documentation.yml new file mode 100644 index 000000000..b5635bdc9 --- /dev/null +++ b/.github/workflows/lint-documentation.yml @@ -0,0 +1,43 @@ +name: Lint documentation files + +on: + push: + paths: + - ".github/workflows/lint-documentation.yml" + - "Taskfile.yml" + # Recognized license files. See: https://github.com/licensee/licensee/blob/master/docs/what-we-look-at.md#detecting-the-license-file + - "COPYING*" + - "LICENCE*" + - "LICENSE*" + pull_request: + paths: + - ".github/workflows/lint-documentation.yml" + - "Taskfile.yml" + - "COPYING*" + - "LICENCE*" + - "LICENSE*" + +jobs: + check-license: + runs-on: ubuntu-latest + + steps: + - name: Checkout local repository + uses: actions/checkout@v2 + + - name: Install Taskfile + uses: arduino/actions/setup-taskfile@master + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + version: 3.x + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ruby # Install latest version + + - name: Install licensee + run: gem install licensee + + # See: https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/licensing-a-repository + - name: Check license file + run: task --silent docs:check-license