Tighten lint workflow scope
lint / prettier (push) Successful in 8s
lint / ruff (push) Failing after 5s
lint / yamllint (push) Successful in 6s
lint / hadolint (push) Failing after 4s
validate / yaml (push) Successful in 6s
validate / k8s (push) Successful in 4s

This commit is contained in:
2026-06-21 21:51:20 +02:00
parent 88a8f2987f
commit f424d91405
4 changed files with 49 additions and 31 deletions
+14 -2
View File
@@ -3,7 +3,7 @@ name: lint
on: on:
push: push:
branches: branches:
- '**' - "**"
pull_request: pull_request:
workflow_dispatch: workflow_dispatch:
@@ -17,11 +17,22 @@ jobs:
- name: Check formatting with Prettier - name: Check formatting with Prettier
shell: bash shell: bash
run: | run: |
mapfile -t prettier_files < <(
git ls-files \
| grep -E '\.(md|json|ya?ml|html|css)$' \
| grep -Ev '^(\.docs/|\.zed/|errorpages/html/|homepages/(forust_files|xdfnx_files)/)'
)
if [ "${#prettier_files[@]}" -eq 0 ]; then
echo "No Prettier-managed files found."
exit 0
fi
docker run --rm \ docker run --rm \
-v "$PWD:/work" \ -v "$PWD:/work" \
-w /work \ -w /work \
node:22-alpine \ node:22-alpine \
sh -lc 'npx --yes prettier@3 --check --ignore-unknown .' sh -lc 'npx --yes prettier@3 --check --ignore-unknown "$@"' sh "${prettier_files[@]}"
ruff: ruff:
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
@@ -74,5 +85,6 @@ jobs:
docker run --rm \ docker run --rm \
-v "$PWD:/work" \ -v "$PWD:/work" \
-w /work \ -w /work \
--entrypoint hadolint \
hadolint/hadolint:latest-debian \ hadolint/hadolint:latest-debian \
-c .hadolint.yaml "${dockerfiles[@]}" -c .hadolint.yaml "${dockerfiles[@]}"
+14 -2
View File
@@ -3,7 +3,7 @@ name: lint
on: on:
push: push:
branches: branches:
- '**' - "**"
pull_request: pull_request:
workflow_dispatch: workflow_dispatch:
@@ -17,11 +17,22 @@ jobs:
- name: Check formatting with Prettier - name: Check formatting with Prettier
shell: bash shell: bash
run: | run: |
mapfile -t prettier_files < <(
git ls-files \
| grep -E '\.(md|json|ya?ml|html|css)$' \
| grep -Ev '^(\.docs/|\.zed/|errorpages/html/|homepages/(forust_files|xdfnx_files)/)'
)
if [ "${#prettier_files[@]}" -eq 0 ]; then
echo "No Prettier-managed files found."
exit 0
fi
docker run --rm \ docker run --rm \
-v "$PWD:/work" \ -v "$PWD:/work" \
-w /work \ -w /work \
node:22-alpine \ node:22-alpine \
sh -lc 'npx --yes prettier@3 --check --ignore-unknown .' sh -lc 'npx --yes prettier@3 --check --ignore-unknown "$@"' sh "${prettier_files[@]}"
ruff: ruff:
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
@@ -74,5 +85,6 @@ jobs:
docker run --rm \ docker run --rm \
-v "$PWD:/work" \ -v "$PWD:/work" \
-w /work \ -w /work \
--entrypoint hadolint \
hadolint/hadolint:latest-debian \ hadolint/hadolint:latest-debian \
-c .hadolint.yaml "${dockerfiles[@]}" -c .hadolint.yaml "${dockerfiles[@]}"
+1 -1
View File
@@ -7,7 +7,7 @@
"api_key": { "api_key": {
"api_key": "api_key_here", "api_key": "api_key_here",
"account_email": "your_email_here" "account_email": "your_email_here"
} },
"zone_id": "your_zone-id", "zone_id": "your_zone-id",
"subdomains": [ "subdomains": [
{ "name": "", "proxied": true }, { "name": "", "proxied": true },
+19 -25
View File
@@ -1,27 +1,21 @@
{ {
"groups": { "groups": {
"group:admin": [ "group:admin": ["admin@"],
"admin@" "group:users": []
], },
"group:users": [] "tagOwners": {},
}, "hosts": {},
"tagOwners": {}, "acls": [
"hosts": {}, {
"acls": [ "randomizeClientPort": false,
{ "#ha-meta": {
"randomizeClientPort": false, "name": "users",
"#ha-meta": { "open": true
"name": "users", },
"open": true "action": "accept",
}, "src": ["autogroup:member"],
"action": "accept", "dst": ["autogroup:self:*"]
"src": [ }
"autogroup:member" ],
], "ssh": []
"dst": [
"autogroup:self:*"
]
}
],
"ssh": []
} }