From 17027b232b24d335d3dbd205460221b63d3ea22a Mon Sep 17 00:00:00 2001 From: mr-forust Date: Sun, 21 Jun 2026 21:45:16 +0200 Subject: [PATCH] Rename workflows to yaml --- .gitea/workflows/lint.yaml | 78 +++++++++++++++++++ .../workflows/{validate.yml => validate.yaml} | 0 .github/workflows/lint.yaml | 78 +++++++++++++++++++ .../workflows/{validate.yml => validate.yaml} | 0 4 files changed, 156 insertions(+) create mode 100644 .gitea/workflows/lint.yaml rename .gitea/workflows/{validate.yml => validate.yaml} (100%) create mode 100644 .github/workflows/lint.yaml rename .github/workflows/{validate.yml => validate.yaml} (100%) diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml new file mode 100644 index 0000000..d1bdd94 --- /dev/null +++ b/.gitea/workflows/lint.yaml @@ -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[@]}" diff --git a/.gitea/workflows/validate.yml b/.gitea/workflows/validate.yaml similarity index 100% rename from .gitea/workflows/validate.yml rename to .gitea/workflows/validate.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..d1bdd94 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -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[@]}" diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yaml similarity index 100% rename from .github/workflows/validate.yml rename to .github/workflows/validate.yaml