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
|
||||
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
|
||||
@@ -10,8 +10,8 @@ tasks:
|
||||
cmds:
|
||||
- >-
|
||||
prettier
|
||||
--ignore-path '.github/lint/.prettierignore'
|
||||
--config '.github/lint/.prettierrc.yaml'
|
||||
--ignore-path '.github/linters/.prettierignore'
|
||||
--config '.github/linters/.prettierrc.yaml'
|
||||
--list-different
|
||||
--ignore-unknown
|
||||
--parser=markdown
|
||||
@@ -22,9 +22,9 @@ tasks:
|
||||
cmds:
|
||||
- >-
|
||||
prettier
|
||||
--ignore-path '.github/lint/.prettierignore'
|
||||
--ignore-path '.github/linters/.prettierignore'
|
||||
--config
|
||||
'.github/lint/.prettierrc.yaml'
|
||||
'.github/linters/.prettierrc.yaml'
|
||||
--list-different
|
||||
--ignore-unknown
|
||||
--parser=yaml
|
||||
|
||||
+3
-3
@@ -10,17 +10,17 @@ tasks:
|
||||
markdown:
|
||||
desc: Lint Markdown
|
||||
cmds:
|
||||
- markdownlint -c '.github/lint/.markdownlint.yaml' *.md **/*.md
|
||||
- markdownlint -c '.github/linters/.markdownlint.yaml' *.md **/*.md
|
||||
ignore_errors: true
|
||||
|
||||
yaml:
|
||||
desc: Lint YAML
|
||||
cmds:
|
||||
- yamllint -c '.github/lint/.yamllint.yaml' .
|
||||
- yamllint -c '.github/linters/.yamllint.yaml' .
|
||||
ignore_errors: true
|
||||
|
||||
format:
|
||||
desc: Lint general formatting
|
||||
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
|
||||
Reference in new issue
Block a user