Skip to content

Commit fe2f415

Browse files
committed
ci: enable superlinter
Signed-off-by: hydai <z54981220@gmail.com>
1 parent 69704f7 commit fe2f415

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.commitlintrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
extends:
3+
- '@commitlint/config-conventional'

.github/workflows/superlinter.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: Super-Linter
3+
4+
on:
5+
push:
6+
branches: [master]
7+
pull_request:
8+
branches: [master]
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
14+
permissions:
15+
contents: read
16+
packages: read
17+
18+
steps:
19+
- name: Checkout Code
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Work around super-linter
25+
shell: bash
26+
run: |
27+
# Work-around for SHA detection
28+
# https://github.com/super-linter/super-linter/issues/6316#issuecomment-2510205626
29+
if [[ '${{ github.event_name }}' == 'pull_request' ]]; then
30+
echo 'GITHUB_BEFORE_SHA=${{ github.event.pull_request.base.sha }}' >> "${GITHUB_ENV}"
31+
fi
32+
- name: Run Super Linter
33+
uses: super-linter/super-linter@v7.3.0
34+
env:
35+
# ASCII Possum is cute, but not necessary
36+
SUPPRESS_POSSUM: true
37+
# Only check new or modified files
38+
VALIDATE_ALL_CODEBASE: false
39+
# Language-specific linters
40+
VALIDATE_MARKDOWN: true
41+
VALIDATE_YAML: true
42+
# Misc configuration
43+
ENFORCE_COMMITLINT_CONFIGURATION_CHECK: true
44+
VALIDATE_GIT_COMMITLINT: true
45+
VALIDATE_GITHUB_ACTIONS: true
46+
VALIDATE_GITLEAKS: true
47+
# Do not rely on the statuses permission
48+
MULTI_STATUS: false

0 commit comments

Comments
 (0)