From e361daf40aad74889888315bcec01638ea083ffd Mon Sep 17 00:00:00 2001 From: shane knapp Date: Fri, 16 Aug 2024 11:27:58 -0700 Subject: [PATCH 1/2] add github workflow for linting yaml --- .github/workflows/yaml-lint.yaml | 14 ++++++++++++++ requirements.txt | 1 + 2 files changed, 15 insertions(+) create mode 100644 .github/workflows/yaml-lint.yaml diff --git a/.github/workflows/yaml-lint.yaml b/.github/workflows/yaml-lint.yaml new file mode 100644 index 000000000..d38c990a5 --- /dev/null +++ b/.github/workflows/yaml-lint.yaml @@ -0,0 +1,14 @@ +--- +on: pull-request # yamllint disable-line rule:truthy + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install yamllint + run: pip install yamllint==1.35.1 + + - name: Lint YAML files + run: yamllint --no-warnings . diff --git a/requirements.txt b/requirements.txt index da3a1ba42..4eacc64bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,3 +10,4 @@ chardet requests==2.31.0 # requests==2.32.3 urllib3<2.0.0 +yamllint==1.35.1 From 2dc547189098c002794161ef7659c8661b01fc2c Mon Sep 17 00:00:00 2001 From: shane knapp Date: Fri, 16 Aug 2024 11:34:05 -0700 Subject: [PATCH 2/2] minor tweaks --- .github/workflows/yaml-lint.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/yaml-lint.yaml b/.github/workflows/yaml-lint.yaml index d38c990a5..b5feb3464 100644 --- a/.github/workflows/yaml-lint.yaml +++ b/.github/workflows/yaml-lint.yaml @@ -1,5 +1,6 @@ ---- -on: pull-request # yamllint disable-line rule:truthy +name: "Yaml lint" +on: + - pull-request # yamllint disable-line rule:truthy jobs: lint: