Tighten lint workflow scope
This commit is contained in:
@@ -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[@]}"
|
||||||
|
|||||||
@@ -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[@]}"
|
||||||
|
|||||||
@@ -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 },
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
{
|
{
|
||||||
"groups": {
|
"groups": {
|
||||||
"group:admin": [
|
"group:admin": ["admin@"],
|
||||||
"admin@"
|
|
||||||
],
|
|
||||||
"group:users": []
|
"group:users": []
|
||||||
},
|
},
|
||||||
"tagOwners": {},
|
"tagOwners": {},
|
||||||
@@ -15,12 +13,8 @@
|
|||||||
"open": true
|
"open": true
|
||||||
},
|
},
|
||||||
"action": "accept",
|
"action": "accept",
|
||||||
"src": [
|
"src": ["autogroup:member"],
|
||||||
"autogroup:member"
|
"dst": ["autogroup:self:*"]
|
||||||
],
|
|
||||||
"dst": [
|
|
||||||
"autogroup:self:*"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"ssh": []
|
"ssh": []
|
||||||
|
|||||||
Reference in New Issue
Block a user