-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(gha): refactor YML lint action
- Loading branch information
1 parent
b6f0a13
commit 8397163
Showing
1 changed file
with
15 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,23 @@ | ||
name: Lint | ||
name: Lint - YAML | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
|
||
editorconfig-checker: | ||
yamllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: editorconfig-checker | ||
run: | | ||
docker run --rm -v ${GITHUB_WORKSPACE}:/check mstruebing/editorconfig-checker | ||
|
||
markdownlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: markdownlint | ||
run: | | ||
find ~+ ${github_workspace} -name '*.md' | xargs docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} markdownlint/markdownlint -r ~MD013,~MD033,~MD034,~MD046,~MD002,~MD041 | ||
- uses: actions/checkout@v4.1.2 | ||
|
||
yamllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: yamllint | ||
- name: Run yamllint | ||
run: | | ||
find ~+ ${github_workspace} -name '*.yaml' -o -name '*.yml' | xargs docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} peterdavehello/yamllint yamllint -d '{extends: default, rules: {document-start: {present: false}, line-length: disable, comments-indentation: disable, indentation: disable}}' | ||
docker run --rm \ | ||
-v "${GITHUB_WORKSPACE}":/yaml \ | ||
peterdavehello/yamllint \ | ||
yamllint \ | ||
-c "/yaml/yamllint.yml" \ | ||
. |