From 5a162b8c0e1aa19b5c0c67ddf97a289a38c285fe Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 26 Oct 2020 00:11:30 -0700 Subject: [PATCH] Add CI workflow to lint documentation files Currently checks the license file. --- .github/workflows/lint-documentation.yml | 43 ++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/lint-documentation.yml 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