77 - main
88 pull_request : null
99
10- permissions : {}
10+ permissions :
11+ contents : write
12+ statuses : write
1113
1214jobs :
1315 build :
@@ -26,10 +28,43 @@ jobs:
2628 fetch-depth : 0
2729
2830 - name : Super-linter
29- uses : super-linter/super-linter@v7
31+ uses : super-linter/super-linter/slim @v7
3032 env :
3133 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3234 VALIDATE_ALL_CODEBASE : false
33- VALIDATE_JSON_PRETTIER : false
34- SQLFLUFF_CONFIG_FILE : .sqlfluff
35- FILTER_REGEX_EXCLUDE : " (.devcontainer/Dockerfile|.github/pull_request_template.md|.github/ISSUE_TEMPLATE/*.md)"
35+ FILTER_REGEX_EXCLUDE : ' (.devcontainer/Dockerfile|.github/pull_request_template.md|.github/ISSUE_TEMPLATE/*.md)'
36+
37+ fix-lint :
38+ name : Fix Lint
39+ runs-on : ubuntu-latest
40+
41+ steps :
42+ - name : Checkout code
43+ uses : actions/checkout@v4
44+ with :
45+ fetch-depth : 0
46+
47+ - name : Super-linter
48+ uses : super-linter/super-linter/slim@v7
49+ env :
50+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51+ VALIDATE_ALL_CODEBASE : false
52+ FILTER_REGEX_EXCLUDE : ' (.github/pull_request_template.md|.github/ISSUE_TEMPLATE/*.md)'
53+ FIX_JSON_PRETTIER : true
54+ FIX_MARKDOWN : true
55+ FIX_MARKDOWN_PRETTIER : true
56+ FIX_SHELL_SHFMT : true
57+ FIX_SQLFLUFF : true
58+ FIX_YAML_PRETTIER : true
59+ VALIDATE_DOCKERFILE_HADOLINT : false
60+
61+ - name : Commit and push linting fixes
62+ if : >
63+ github.event_name == 'pull_request' &&
64+ github.event.pull_request.head.ref != github.event.repository.default_branch
65+ uses : stefanzweifel/git-auto-commit-action@v5
66+ with :
67+ branch : ${{ github.event.pull_request.head.ref }}
68+ commit_message : ' chore: fix linting issues'
69+ commit_user_name : super-linter
70+ commit_user_email :
[email protected]
0 commit comments