Skip to content

Commit 0025398

Browse files
authored
ci(trunk): initial configuration (#4)
* ci(trunk): initial configuration * ci(trunk): do not lint CHANGELOG.md * ci(trunk): enable fmt and check pre-commit actions
1 parent 72c90d9 commit 0025398

File tree

7 files changed

+80
-0
lines changed

7 files changed

+80
-0
lines changed

.github/workflows/trunk-check.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Pull Request
2+
on: [pull_request]
3+
concurrency:
4+
group: ${{ github.head_ref || github.run_id }}
5+
cancel-in-progress: true
6+
7+
permissions: read-all
8+
9+
jobs:
10+
trunk_check:
11+
name: Trunk Code Quality Runner
12+
runs-on: ubuntu-latest
13+
permissions:
14+
checks: write # For trunk to post annotations
15+
contents: read # For repo checkout
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Trunk Code Quality
22+
uses: trunk-io/trunk-action@v1

.trunk/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*out
2+
*logs
3+
*actions
4+
*notifications
5+
*tools
6+
plugins
7+
user_trunk.yaml
8+
user.yaml
9+
tmp

.trunk/configs/.hadolint.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Following source doesn't work in most setups
2+
ignored:
3+
- SC1090
4+
- SC1091

.trunk/configs/.markdownlint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Prettier friendly markdownlint config (all formatting rules disabled)
2+
extends: markdownlint/style/prettier

.trunk/configs/.yamllint.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
rules:
2+
quoted-strings:
3+
required: only-when-needed
4+
extra-allowed: ["{|}"]
5+
key-duplicates: {}
6+
octal-values:
7+
forbid-implicit-octal: true

.trunk/trunk.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
2+
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
3+
version: 0.1
4+
cli:
5+
version: 1.22.12
6+
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
7+
plugins:
8+
sources:
9+
- id: trunk
10+
ref: v1.6.8
11+
uri: https://github.com/trunk-io/plugins
12+
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
13+
runtimes:
14+
enabled:
15+
- node@18.20.5
16+
- python@3.10.8
17+
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
18+
lint:
19+
ignore:
20+
- linters: [markdownlint]
21+
paths:
22+
- CHANGELOG.md
23+
enabled:
24+
- actionlint@1.7.7
25+
- checkov@3.2.408
26+
- git-diff-check
27+
- hadolint@2.12.1-beta
28+
- markdownlint@0.44.0
29+
- osv-scanner@2.0.1
30+
- prettier@3.5.3
31+
- trufflehog@3.88.25
32+
- yamllint@1.37.0
33+
actions:
34+
enabled:
35+
- trunk-check-pre-commit
36+
- trunk-fmt-pre-commit

CHANGELOG.md

Whitespace-only changes.

0 commit comments

Comments
 (0)