Repository navigation
83 lines (69 loc) · 2.11 KB
/
Copy pathlint.yml
File metadata and controls
83 lines (69 loc) · 2.11 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Lint & Format
permissions:
contents: write
pull-requests: write
on:
workflow_dispatch:
concurrency:
group: lint
cancel-in-progress: false
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Git
run: |
echo '${{ github.token }}' | gh auth login --with-token
gh auth status
gh auth setup-git
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Setup pnpm
uses: pnpm/action-setup@v6
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version-file: package.json
check-latest: true
cache: pnpm
- name: Install dependencies (pnpm)
run: pnpm install
- name: Cpp Lint (clang-format & clang-tidy)
uses: cpp-linter/cpp-linter-action@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
style: file
thread-comments: update
# version: 19
files-changed-only: false
continue-on-error: true
- name: ESLint (+vue +prettier +ts)
run: pnpm exec eslint --fix --ignore-pattern .gitignore
continue-on-error: true
- name: Prettier
run: pnpm exec prettier --write .
continue-on-error: true
- name: Markdown Lint
uses: DavidAnson/markdownlint-cli2-action@v24
with:
globs: "**/*.{md,markdown};!node_modules"
fix: true
separator: ";"
continue-on-error: true
- name: Autocorrect Fix
uses: huacnlee/autocorrect-action@v2
with:
args: --fix
continue-on-error: true
- name: Create PullRequest
env:
lint_branch: lint/${{ github.sha }}
run: |
git switch -C $lint_branch
git commit -a --fixup=${{ github.sha }}
git push -f origin $lint_branch
gh pr create --fill-verbose -t lint:${{ github.ref }} -B main -H $lint_branch
continue-on-error: true