Skip to content

Commit 94e20fa

Browse files
committed
ci(GHA): added running pre-commit hooks
Signed-off-by: András Jáky <ajaky@cisco.com>
1 parent ecb377a commit 94e20fa

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ jobs:
108108
- name: Lint
109109
run: nix develop --impure .#ci -c make lint -j
110110

111+
- name: Pre-commit hooks
112+
run: nix develop --impure .#ci -c pre-commit run -a
113+
114+
- name: Check commit messages
115+
run: nix develop --impure .#ci -c pre-commit run --hook-stage manual
116+
111117
license-check:
112118
name: License check
113119
runs-on: ubuntu-latest

.hadolint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
failure-threshold: error

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ lint-helm: # Run helm lint check
4343

4444
.PHONY: lint-docker
4545
lint-docker: # Run Dockerfile lint check
46-
$(HADOLINT) --failure-threshold error Dockerfile
46+
$(HADOLINT) Dockerfile
4747

4848
.PHONY: lint
4949
lint: lint-go lint-helm lint-docker ## Run lint checks

flake.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
nixpkgs-fmt.enable = true;
3333
yamllint.enable = true;
3434
hadolint.enable = true;
35+
helm-docs = {
36+
enable = true;
37+
name = "helm-docs";
38+
description = "Uses 'helm-docs' to create documentation from the Helm chart's 'values.yaml' file, and inserts the result into a corresponding 'README.md' file.";
39+
files = "";
40+
entry = "${pkgs.helm-docs}/bin/helm-docs";
41+
};
3542
};
3643

3744
packages = with pkgs; [

0 commit comments

Comments
 (0)