diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml new file mode 100644 index 000000000..92e1de761 --- /dev/null +++ b/.github/workflows/check-formatting.yml @@ -0,0 +1,46 @@ +name: Check formatting + +on: + push: + paths: + - ".github/workflows/check-formatting.yml" + - "Taskfile.yml" + - ".prettierrc" + - "**.go" + - "**.json" + - "**.md" + - "**.yaml" + - "**.yml" + pull_request: + paths: + - ".github/workflows/check-formatting.yml" + - "Taskfile.yml" + - ".prettierrc" + - "**.go" + - "**.json" + - "**.md" + - "**.yaml" + - "**.yml" + +jobs: + check-formatting: + 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 + + - name: Check Go code formatting + run: task go:check-formatting + + - name: Check documentation formatting + run: task docs:check-formatting + + - name: Check configuration file formatting + run: task config:check-formatting diff --git a/.github/workflows/lint-documentation.yml b/.github/workflows/lint-documentation.yml index b5635bdc9..b571839d6 100644 --- a/.github/workflows/lint-documentation.yml +++ b/.github/workflows/lint-documentation.yml @@ -33,7 +33,7 @@ jobs: - uses: ruby/setup-ruby@v1 with: - ruby-version: ruby # Install latest version + ruby-version: ruby # Install latest version - name: Install licensee run: gem install licensee