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
@@ -0,0 +1,3 @@
|
|||||||
|
# .ansible-lint
|
||||||
|
warn_list:
|
||||||
|
- unnamed-task
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
Whitespace-only changes.
File renamed without changes.
@@ -1,28 +0,0 @@
|
|||||||
---
|
|
||||||
name: Lint Markdown files on Pull Requests
|
|
||||||
|
|
||||||
on: # yamllint disable-line rule:truthy
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "**.md"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
markdownlint:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Get changes
|
|
||||||
uses: dorny/paths-filter@v2
|
|
||||||
id: filter
|
|
||||||
with:
|
|
||||||
list-files: shell
|
|
||||||
filters: |
|
|
||||||
markdown:
|
|
||||||
- added|modified: "**.md"
|
|
||||||
- name: Lint files
|
|
||||||
if: ${{ steps.filter.outputs.markdown == 'true' }}
|
|
||||||
uses: reviewdog/action-shellcheck@v1
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
markdownlint_flags: "-c '.github/lint/.markdownlint.yaml' ${{ steps.filter.outputs.markdown_files }}"
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
---
|
|
||||||
name: Lint Shell scripts on Pull Requests
|
|
||||||
|
|
||||||
on: # yamllint disable-line rule:truthy
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "**.sh"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
shellcheck:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Get changes
|
|
||||||
uses: dorny/paths-filter@v2
|
|
||||||
id: filter
|
|
||||||
with:
|
|
||||||
list-files: shell
|
|
||||||
filters: |
|
|
||||||
shell:
|
|
||||||
- added|modified: "**.sh"
|
|
||||||
- name: Lint files
|
|
||||||
if: ${{ steps.filter.outputs.shell == 'true' }}
|
|
||||||
uses: reviewdog/action-shellcheck@v1
|
|
||||||
with:
|
|
||||||
shellcheck_flags: "${{ steps.filter.outputs.shell_files }}"
|
|
||||||
+23
-19
@@ -1,29 +1,33 @@
|
|||||||
---
|
---
|
||||||
name: Lint YAML files on Pull Requests
|
name: Lint
|
||||||
|
|
||||||
on: # yamllint disable-line rule:truthy
|
on: # yamllint disable-line rule:truthy
|
||||||
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
branches:
|
||||||
- "**.yaml"
|
- main
|
||||||
- "**.yml"
|
|
||||||
|
env:
|
||||||
|
# Currently no way to detect automatically
|
||||||
|
DEFAULT_BRANCH: main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
yamllint:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
name: Lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Get changes
|
|
||||||
uses: dorny/paths-filter@v2
|
|
||||||
id: filter
|
|
||||||
with:
|
with:
|
||||||
list-files: shell
|
fetch-depth: 0
|
||||||
filters: |
|
- name: Lint
|
||||||
yaml:
|
uses: github/super-linter/slim@v4
|
||||||
- added|modified: "**.yaml"
|
env:
|
||||||
- added|modified: "**.yml"
|
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
- name: Lint files
|
DEFAULT_BRANCH: "${{ env.DEFAULT_BRANCH }}"
|
||||||
if: ${{ steps.filter.outputs.yaml == 'true' }}
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
uses: reviewdog/action-yamllint@v1
|
ANSIBLE_CONFIG_FILE: .ansible-lint
|
||||||
with:
|
MARKDOWN_CONFIG_FILE: .markdownlint.yaml
|
||||||
yamllint_flags: "-c .github/lint/.yamllint.yaml ${{ steps.filter.outputs.yaml_files }}"
|
TERRAFORM_TFLINT_CONFIG_FILE: .tflint.hcl
|
||||||
|
YAML_CONFIG_FILE: .yamllint.yaml
|
||||||
|
KUBERNETES_KUBEVAL_OPTIONS: --ignore-missing-schemas
|
||||||
@@ -10,8 +10,8 @@ tasks:
|
|||||||
cmds:
|
cmds:
|
||||||
- >-
|
- >-
|
||||||
prettier
|
prettier
|
||||||
--ignore-path '.github/lint/.prettierignore'
|
--ignore-path '.github/linters/.prettierignore'
|
||||||
--config '.github/lint/.prettierrc.yaml'
|
--config '.github/linters/.prettierrc.yaml'
|
||||||
--list-different
|
--list-different
|
||||||
--ignore-unknown
|
--ignore-unknown
|
||||||
--parser=markdown
|
--parser=markdown
|
||||||
@@ -22,9 +22,9 @@ tasks:
|
|||||||
cmds:
|
cmds:
|
||||||
- >-
|
- >-
|
||||||
prettier
|
prettier
|
||||||
--ignore-path '.github/lint/.prettierignore'
|
--ignore-path '.github/linters/.prettierignore'
|
||||||
--config
|
--config
|
||||||
'.github/lint/.prettierrc.yaml'
|
'.github/linters/.prettierrc.yaml'
|
||||||
--list-different
|
--list-different
|
||||||
--ignore-unknown
|
--ignore-unknown
|
||||||
--parser=yaml
|
--parser=yaml
|
||||||
|
|||||||
+3
-3
@@ -10,17 +10,17 @@ tasks:
|
|||||||
markdown:
|
markdown:
|
||||||
desc: Lint Markdown
|
desc: Lint Markdown
|
||||||
cmds:
|
cmds:
|
||||||
- markdownlint -c '.github/lint/.markdownlint.yaml' *.md **/*.md
|
- markdownlint -c '.github/linters/.markdownlint.yaml' *.md **/*.md
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
yaml:
|
yaml:
|
||||||
desc: Lint YAML
|
desc: Lint YAML
|
||||||
cmds:
|
cmds:
|
||||||
- yamllint -c '.github/lint/.yamllint.yaml' .
|
- yamllint -c '.github/linters/.yamllint.yaml' .
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
format:
|
format:
|
||||||
desc: Lint general formatting
|
desc: Lint general formatting
|
||||||
cmds:
|
cmds:
|
||||||
- prettier --ignore-path '.github/lint/.prettierignore' --config '.github/lint/.prettierrc.yaml' --check .
|
- prettier --ignore-path '.github/linters/.prettierignore' --config '.github/linters/.prettierrc.yaml' --check .
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
Reference in new issue
Block a user