Skip to content

Commit e775c4f

Browse files
authored
ci: moved from super-linter to hk (#217)
1 parent bc64a77 commit e775c4f

5 files changed

Lines changed: 76 additions & 37 deletions

File tree

.github/workflows/hk.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: hk
3+
4+
permissions: {}
5+
6+
on: # yamllint disable-line rule:truthy
7+
push:
8+
branches:
9+
- main
10+
- renovate/**
11+
pull_request:
12+
13+
jobs:
14+
lint:
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
17+
github.ref }}
18+
cancel-in-progress: true
19+
permissions:
20+
contents: read
21+
packages: read
22+
# To report GitHub Actions status checks
23+
statuses: write
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
27+
with:
28+
persist-credentials: false
29+
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac
30+
- name: hk checks
31+
run: hk check --no-progress --all
32+
env:
33+
HK_PKL_BACKEND: pklr
34+
- name: Display hk log on failure
35+
if: failure()
36+
run: cat /home/runner/.local/state/hk/output.log

.github/workflows/super-linter.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.markdownlint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"MD013": false
3+
}

hk.pkl

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
amends "package://github.com/jdx/hk/releases/download/v1.43.0/hk@1.43.0#/Config.pkl"
2+
import "package://github.com/jdx/hk/releases/download/v1.43.0/hk@1.43.0#/Builtins.pkl"
3+
4+
local linters = new Mapping<String, Step> {
5+
["golangci-lint"] = Builtins.golangci_lint
6+
["markdown-lint"] = Builtins.markdown_lint
7+
["prettier"] = Builtins.prettier
8+
["zizmor"] = Builtins.zizmor
9+
}
10+
11+
hooks {
12+
["pre-commit"] {
13+
stash = "git"
14+
steps = linters
15+
}
16+
["fix"] {
17+
fix = true
18+
steps = linters
19+
}
20+
["check"] {
21+
steps = linters
22+
}
23+
["pre-push"] {
24+
steps {
25+
["go-vuln-check"] = Builtins.go_vuln_check
26+
}
27+
}
28+
["commit-msg"] {
29+
steps {
30+
["check-conventional-commit"] = Builtins.check_conventional_commit
31+
}
32+
}
33+
}

mise.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
[tools]
22
go = "1.26.2"
33
"go:github.com/vladopajic/go-test-coverage/v2" = "2.18.4"
4+
"go:golang.org/x/vuln/cmd/govulncheck" = "1.2.0"
45
golangci-lint = "2.11.4"
56
goreleaser = "2.15.3"
67
gotestsum = "1.13.0"
8+
hk = "1.43.0"
9+
"npm:markdownlint-cli" = "0.48.0"
710
prettier = "3.8.3"
11+
zizmor = "1.24.1"
812

913
[env]
1014
COVEROUT = "cover.out"

0 commit comments

Comments
 (0)