-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.49 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Lint
on: # yamllint disable-line rule:truthy
push: null
pull_request: null
permissions:
contents: read
jobs:
fix-lint-issues:
permissions:
# To write linting fixes
contents: write
# To write Super-linter status checks
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Super-Linter
uses: super-linter/super-linter/[email protected] # x-release-please-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Set your fix mode variables to true
FIX_PYTHON_RUFF: true
FIX_YAML_PRETTIER: true
# To reuse the same Super-linter configuration that you use in the
# lint job without duplicating it, see
# https://github.com/super-linter/super-linter/blob/main/docs/run-linter-locally.md#share-environment-variables-between-environments
- name: Commit and push linting fixes
# Run only on:
# - Pull requests
# - Not on the default branch
if: >
github.event_name == 'pull_request' &&
github.ref_name != github.event.repository.default_branch
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
commit_message: "chore: fix linting issues"
commit_user_name: super-linter
commit_user_email: [email protected]