From 824dbf71e5efe7719d9ff0836987151654cb692b Mon Sep 17 00:00:00 2001 From: strangiato Date: Thu, 30 Sep 2021 19:34:31 -0500 Subject: [PATCH 1/4] add yaml-lint action --- .github/workflows/yaml-lint.yaml | 26 ++++++++++++++++++++++++++ hack/validate_yaml.sh | 3 +++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/yaml-lint.yaml create mode 100644 hack/validate_yaml.sh diff --git a/.github/workflows/yaml-lint.yaml b/.github/workflows/yaml-lint.yaml new file mode 100644 index 00000000..241c7ca0 --- /dev/null +++ b/.github/workflows/yaml-lint.yaml @@ -0,0 +1,26 @@ +name: YAML Lint +on: + push: + branches: + - "*" + pull_request: + branches: + - "*" + +jobs: + yaml-lint: + runs-on: ubuntu-latest + steps: + - name: Code Checkout + uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + architecture: 'x64' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install yamllint + - name: Validate Manifests + run: ./hack/validate_yaml.sh diff --git a/hack/validate_yaml.sh b/hack/validate_yaml.sh new file mode 100644 index 00000000..3698aad1 --- /dev/null +++ b/hack/validate_yaml.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +yamllint . -f github From 2eef06b85046f5b7ea66391180c3ccb2b3ac7b9a Mon Sep 17 00:00:00 2001 From: strangiato Date: Thu, 30 Sep 2021 19:35:37 -0500 Subject: [PATCH 2/4] add execute permissions --- hack/validate_yaml.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 hack/validate_yaml.sh diff --git a/hack/validate_yaml.sh b/hack/validate_yaml.sh old mode 100644 new mode 100755 From 8b667237c6292d631bde7ae9f7214f16550c4989 Mon Sep 17 00:00:00 2001 From: strangiato Date: Thu, 30 Sep 2021 19:39:25 -0500 Subject: [PATCH 3/4] test upstream action --- .github/workflows/yaml-lint.yaml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/yaml-lint.yaml b/.github/workflows/yaml-lint.yaml index 241c7ca0..257b53ee 100644 --- a/.github/workflows/yaml-lint.yaml +++ b/.github/workflows/yaml-lint.yaml @@ -13,14 +13,17 @@ jobs: steps: - name: Code Checkout uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - architecture: 'x64' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install yamllint - - name: Validate Manifests - run: ./hack/validate_yaml.sh + - name: Yamllint Github Action + uses: karancode/yamllint-github-action@v2.0.0 + + # - name: Set up Python 3.8 + # uses: actions/setup-python@v2 + # with: + # python-version: 3.8 + # architecture: 'x64' + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install yamllint + # - name: Validate Manifests + # run: ./hack/validate_yaml.sh From f2344d9851845309057c6c994e6a06089d3c3c5c Mon Sep 17 00:00:00 2001 From: strangiato Date: Thu, 30 Sep 2021 19:45:58 -0500 Subject: [PATCH 4/4] add comment --- .github/workflows/yaml-lint.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/yaml-lint.yaml b/.github/workflows/yaml-lint.yaml index 257b53ee..ab947237 100644 --- a/.github/workflows/yaml-lint.yaml +++ b/.github/workflows/yaml-lint.yaml @@ -15,7 +15,10 @@ jobs: uses: actions/checkout@v2 - name: Yamllint Github Action uses: karancode/yamllint-github-action@v2.0.0 - + with: + yamllint_comment: true + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} # - name: Set up Python 3.8 # uses: actions/setup-python@v2 # with: