ci: restore docker-based lint and validate jobs
ci / lint-prettier (push) Successful in 6s
ci / lint-ruff (push) Successful in 3s
ci / lint-yaml (push) Successful in 3s
ci / lint-dockerfiles (push) Successful in 6s
ci / validate (push) Successful in 4s
ci / publish (push) Successful in 5s

This commit is contained in:
2026-06-30 01:12:51 +02:00
parent 849bf97c97
commit b963cf07df
2 changed files with 58 additions and 60 deletions
+29 -30
View File
@@ -33,12 +33,11 @@ jobs:
exit 0 exit 0
fi fi
command -v prettier >/dev/null 2>&1 || { docker run --rm \
echo "prettier is required on PATH but was not found." -v "$PWD:/work" \
exit 1 -w /work \
} node:22-alpine \
sh -lc 'npx --yes prettier@3 --check --ignore-unknown "$@"' sh "${prettier_files[@]}"
prettier --check --ignore-unknown "${prettier_files[@]}"
lint-ruff: lint-ruff:
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
@@ -49,12 +48,11 @@ jobs:
- name: Lint Python with Ruff - name: Lint Python with Ruff
shell: bash shell: bash
run: | run: |
command -v ruff >/dev/null 2>&1 || { docker run --rm \
echo "ruff is required on PATH but was not found." -v "$PWD:/work" \
exit 1 -w /work \
} ghcr.io/astral-sh/ruff:latest \
check .
ruff check .
lint-yaml: lint-yaml:
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
@@ -65,12 +63,11 @@ jobs:
- name: Lint YAML syntax - name: Lint YAML syntax
shell: bash shell: bash
run: | run: |
command -v yamllint >/dev/null 2>&1 || { docker run --rm \
echo "yamllint is required on PATH but was not found." -v "$PWD:/work" \
exit 1 -w /work \
} cytopia/yamllint:latest \
-c .yamllint .
yamllint -c .yamllint .
lint-dockerfiles: lint-dockerfiles:
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
@@ -90,12 +87,12 @@ jobs:
exit 0 exit 0
fi fi
command -v hadolint >/dev/null 2>&1 || { docker run --rm \
echo "hadolint is required on PATH but was not found." -v "$PWD:/work" \
exit 1 -w /work \
} --entrypoint hadolint \
hadolint/hadolint:latest-debian \
hadolint -c .hadolint.yaml "${dockerfiles[@]}" -c .hadolint.yaml "${dockerfiles[@]}"
validate: validate:
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
@@ -116,12 +113,14 @@ jobs:
exit 0 exit 0
fi fi
command -v kubeconform >/dev/null 2>&1 || { docker run --rm \
echo "kubeconform is required on PATH but was not found." -v "$PWD:/work" \
exit 1 -w /work \
} ghcr.io/yannh/kubeconform:latest \
-strict \
kubeconform -strict -ignore-missing-schemas -summary "${manifests[@]}" -ignore-missing-schemas \
-summary \
"${manifests[@]}"
publish: publish:
needs: [lint-prettier, lint-ruff, lint-yaml, lint-dockerfiles, validate] needs: [lint-prettier, lint-ruff, lint-yaml, lint-dockerfiles, validate]
+29 -30
View File
@@ -33,12 +33,11 @@ jobs:
exit 0 exit 0
fi fi
command -v prettier >/dev/null 2>&1 || { docker run --rm \
echo "prettier is required on PATH but was not found." -v "$PWD:/work" \
exit 1 -w /work \
} node:22-alpine \
sh -lc 'npx --yes prettier@3 --check --ignore-unknown "$@"' sh "${prettier_files[@]}"
prettier --check --ignore-unknown "${prettier_files[@]}"
lint-ruff: lint-ruff:
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
@@ -49,12 +48,11 @@ jobs:
- name: Lint Python with Ruff - name: Lint Python with Ruff
shell: bash shell: bash
run: | run: |
command -v ruff >/dev/null 2>&1 || { docker run --rm \
echo "ruff is required on PATH but was not found." -v "$PWD:/work" \
exit 1 -w /work \
} ghcr.io/astral-sh/ruff:latest \
check .
ruff check .
lint-yaml: lint-yaml:
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
@@ -65,12 +63,11 @@ jobs:
- name: Lint YAML syntax - name: Lint YAML syntax
shell: bash shell: bash
run: | run: |
command -v yamllint >/dev/null 2>&1 || { docker run --rm \
echo "yamllint is required on PATH but was not found." -v "$PWD:/work" \
exit 1 -w /work \
} cytopia/yamllint:latest \
-c .yamllint .
yamllint -c .yamllint .
lint-dockerfiles: lint-dockerfiles:
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
@@ -90,12 +87,12 @@ jobs:
exit 0 exit 0
fi fi
command -v hadolint >/dev/null 2>&1 || { docker run --rm \
echo "hadolint is required on PATH but was not found." -v "$PWD:/work" \
exit 1 -w /work \
} --entrypoint hadolint \
hadolint/hadolint:latest-debian \
hadolint -c .hadolint.yaml "${dockerfiles[@]}" -c .hadolint.yaml "${dockerfiles[@]}"
validate: validate:
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
@@ -116,12 +113,14 @@ jobs:
exit 0 exit 0
fi fi
command -v kubeconform >/dev/null 2>&1 || { docker run --rm \
echo "kubeconform is required on PATH but was not found." -v "$PWD:/work" \
exit 1 -w /work \
} ghcr.io/yannh/kubeconform:latest \
-strict \
kubeconform -strict -ignore-missing-schemas -summary "${manifests[@]}" -ignore-missing-schemas \
-summary \
"${manifests[@]}"
publish: publish:
needs: [lint-prettier, lint-ruff, lint-yaml, lint-dockerfiles, validate] needs: [lint-prettier, lint-ruff, lint-yaml, lint-dockerfiles, validate]