Skip to content

Commit

Permalink
Check the YAML code in the repo with a linter
Browse files Browse the repository at this point in the history
This check will comment right in the pull request on the lines
which have style violations.

Resolve a few found style violations.

Configure yamllint to skip the 'truthy' check because
otherwise it shows an error on completely fine line 4
in .github/workflows/yaml-lint.yml

See the docs in https://yamllint.readthedocs.io/en/stable/index.html
  • Loading branch information
NickVolynkin committed Jun 27, 2022
1 parent 285d0fa commit 470a3cc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Lint YAML code

on:
push:
branches:
- '**'
tags-ignore:
- '**'
jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: YAML Lint and Annotate
uses: Staffbase/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
target-path: .
3 changes: 3 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
rules:
truthy: disable
1 change: 1 addition & 0 deletions cleanup/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: 'Clean workspace'
description: 'Clean workspace directory after previous workflow run'
runs:
Expand Down

0 comments on commit 470a3cc

Please sign in to comment.