fix(github-action): update linters and lint workflows
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
11 files changed
+33
-81
No files matched your search
+23
-19
@@ -1,29 +1,33 @@
|
||||
---
|
||||
name: Lint YAML files on Pull Requests
|
||||
name: Lint
|
||||
|
||||
on: # yamllint disable-line rule:truthy
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
paths:
|
||||
- "**.yaml"
|
||||
- "**.yml"
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
# Currently no way to detect automatically
|
||||
DEFAULT_BRANCH: main
|
||||
|
||||
jobs:
|
||||
yamllint:
|
||||
runs-on: ubuntu-20.04
|
||||
build:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Get changes
|
||||
uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
list-files: shell
|
||||
filters: |
|
||||
yaml:
|
||||
- added|modified: "**.yaml"
|
||||
- added|modified: "**.yml"
|
||||
- name: Lint files
|
||||
if: ${{ steps.filter.outputs.yaml == 'true' }}
|
||||
uses: reviewdog/action-yamllint@v1
|
||||
with:
|
||||
yamllint_flags: "-c .github/lint/.yamllint.yaml ${{ steps.filter.outputs.yaml_files }}"
|
||||
fetch-depth: 0
|
||||
- name: Lint
|
||||
uses: github/super-linter/slim@v4
|
||||
env:
|
||||
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
DEFAULT_BRANCH: "${{ env.DEFAULT_BRANCH }}"
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
ANSIBLE_CONFIG_FILE: .ansible-lint
|
||||
MARKDOWN_CONFIG_FILE: .markdownlint.yaml
|
||||
TERRAFORM_TFLINT_CONFIG_FILE: .tflint.hcl
|
||||
YAML_CONFIG_FILE: .yamllint.yaml
|
||||
KUBERNETES_KUBEVAL_OPTIONS: --ignore-missing-schemas
|
||||
Reference in new issue
Block a user