From 43dbf110a3077207be2fdb092d494aab0017f229 Mon Sep 17 00:00:00 2001 From: L3D Date: Wed, 10 Apr 2024 15:35:29 +0200 Subject: [PATCH] improve linting actions --- .github/dependabot.yml | 7 +++++-- .github/workflows/ansible-linting-check.yml | 10 +++++----- .github/workflows/j2lint-check.yml | 22 +++++++++++++++++++++ .github/workflows/yamllint-check.yml | 22 +++++++++++++++++++++ .github/workflows/yamllint.yaml | 19 ------------------ 5 files changed, 54 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/j2lint-check.yml create mode 100644 .github/workflows/yamllint-check.yml delete mode 100644 .github/workflows/yamllint.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index dde6f4a..c40819a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,8 +2,11 @@ # See https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 updates: - - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "daily" + interval: "weekly" + - package-ecosystem: "gitsubmodule" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/ansible-linting-check.yml b/.github/workflows/ansible-linting-check.yml index 847fe57..9f13b8c 100644 --- a/.github/workflows/ansible-linting-check.yml +++ b/.github/workflows/ansible-linting-check.yml @@ -10,14 +10,14 @@ jobs: runs-on: ubuntu-latest steps: - - name: 'checkout git repo' - uses: actions/checkout@v4.1.2 + - name: Checkout git repo + uses: actions/checkout@v4 with: - lfs: true submodules: true fetch-depth: 0 - name: Run ansible-lint - uses: ansible-actions/ansible-lint-action@v1.0.3 + uses: ansible-actions/ansible-lint-action@v1.0.2 with: - target: "site.yml" + target: "./" + python_dependency_file: 'requirements.txt' diff --git a/.github/workflows/j2lint-check.yml b/.github/workflows/j2lint-check.yml new file mode 100644 index 0000000..95647bd --- /dev/null +++ b/.github/workflows/j2lint-check.yml @@ -0,0 +1,22 @@ +--- +name: Jinja2 Linting check + +# yamllint disable-line rule:truthy +on: [push, pull_request] + +jobs: + build: + name: Jinja2 Linting + runs-on: ubuntu-latest + + steps: + - name: Checkout git repo + uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + + - name: Run j2lint + uses: ansible-actions/j2lint-action@v0.0.1 + with: + target: "templates/" diff --git a/.github/workflows/yamllint-check.yml b/.github/workflows/yamllint-check.yml new file mode 100644 index 0000000..5e62f57 --- /dev/null +++ b/.github/workflows/yamllint-check.yml @@ -0,0 +1,22 @@ +--- +name: Yamllint check + +# yamllint disable-line rule:truthy +on: [push, pull_request] + +jobs: + build: + name: Yamllint + runs-on: ubuntu-latest + + steps: + - name: Checkout git repo + uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + + - name: Run yamllint + uses: ansible-actions/yamllint-action@v0.0.1 + with: + target: "./" diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml deleted file mode 100644 index d3cf092..0000000 --- a/.github/workflows/yamllint.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: 'Yamllint GitHub Actions' - -# yamllint disable-line rule:truthy -on: [push, pull_request] - -jobs: - yamllint: - name: 'Yamllint' - runs-on: ubuntu-latest - steps: - - name: 'checkout git repo' - uses: actions/checkout@v4.1.2 - - - name: 'Yamllint' - uses: karancode/yamllint-github-action@v2.1.1 - with: - yamllint_file_or_dir: '.' - yamllint_config_filepath: './.yamllint'