Rename workflows to yaml

This commit is contained in:
2026-06-21 21:45:16 +02:00
parent 6ecbbb39b4
commit 17027b232b
4 changed files with 156 additions and 0 deletions
+78
View File
@@ -0,0 +1,78 @@
name: lint
on:
push:
branches:
- '**'
pull_request:
workflow_dispatch:
jobs:
prettier:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check formatting with Prettier
shell: bash
run: |
docker run --rm \
-v "$PWD:/work" \
-w /work \
node:22-alpine \
sh -lc 'npx --yes prettier@3 --check --ignore-unknown .'
ruff:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint Python with Ruff
shell: bash
run: |
docker run --rm \
-v "$PWD:/work" \
-w /work \
ghcr.io/astral-sh/ruff:latest \
check .
yamllint:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint YAML syntax
shell: bash
run: |
docker run --rm \
-v "$PWD:/work" \
-w /work \
cytopia/yamllint:latest \
-c .yamllint .
hadolint:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint Dockerfiles
shell: bash
run: |
mapfile -t dockerfiles < <(
git ls-files ':(glob)**/Dockerfile' ':(glob)**/Dockerfile.*'
)
if [ "${#dockerfiles[@]}" -eq 0 ]; then
echo "No Dockerfiles found."
exit 0
fi
docker run --rm \
-v "$PWD:/work" \
-w /work \
hadolint/hadolint:latest-debian \
-c .hadolint.yaml "${dockerfiles[@]}"
+78
View File
@@ -0,0 +1,78 @@
name: lint
on:
push:
branches:
- '**'
pull_request:
workflow_dispatch:
jobs:
prettier:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check formatting with Prettier
shell: bash
run: |
docker run --rm \
-v "$PWD:/work" \
-w /work \
node:22-alpine \
sh -lc 'npx --yes prettier@3 --check --ignore-unknown .'
ruff:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint Python with Ruff
shell: bash
run: |
docker run --rm \
-v "$PWD:/work" \
-w /work \
ghcr.io/astral-sh/ruff:latest \
check .
yamllint:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint YAML syntax
shell: bash
run: |
docker run --rm \
-v "$PWD:/work" \
-w /work \
cytopia/yamllint:latest \
-c .yamllint .
hadolint:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint Dockerfiles
shell: bash
run: |
mapfile -t dockerfiles < <(
git ls-files ':(glob)**/Dockerfile' ':(glob)**/Dockerfile.*'
)
if [ "${#dockerfiles[@]}" -eq 0 ]; then
echo "No Dockerfiles found."
exit 0
fi
docker run --rm \
-v "$PWD:/work" \
-w /work \
hadolint/hadolint:latest-debian \
-c .hadolint.yaml "${dockerfiles[@]}"