From cf6f209ebf03c3a4faf4e32971ba036d60ddb36b Mon Sep 17 00:00:00 2001 From: Noel Sabia Date: Sun, 18 Oct 2026 17:11:31 +0200 Subject: [PATCH] fix(ci): make droast job actually run The dockerfile-lint job skipped on every PR despite Dockerfiles existing: the act runner's hashFiles() evaluation returned empty. Replace it with an explicit file-discovery step. Also run the droast binary in node:22-bookworm (arch-aware install) instead of the vendor image, which ships no node and would fail actions/checkout with exit 127 - same failure mode as the gitleaks image. --- .gitea/workflows/pr-checker.yml | 39 +++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/pr-checker.yml b/.gitea/workflows/pr-checker.yml index 45f2515..c7c65cc 100644 --- a/.gitea/workflows/pr-checker.yml +++ b/.gitea/workflows/pr-checker.yml @@ -116,14 +116,45 @@ jobs: dockerfile-lint: name: Dockerfile lint (droast) runs-on: ubuntu-latest - container: - image: immanuwell/droast:1.7.0 - # skips until the repo contains a Dockerfile - if: ${{ hashFiles('**/Dockerfile', '**/Dockerfile.*', '**/Containerfile') != '' }} + # droast's own container image ships no node (actions/checkout would + # fail with exit 127 - same as the gitleaks image), so run the droast + # binary in the multi-arch node image instead + container: node:22-bookworm steps: - uses: actions/checkout@v4 + - name: Install droast + run: | + case "$(uname -m)" in + x86_64) DROAST_ASSET=droast-linux-x86_64 ;; + aarch64) DROAST_ASSET=droast-linux-arm64 ;; + *) echo "unsupported arch: $(uname -m)" && exit 1 ;; + esac + curl -fsSL -o /usr/local/bin/droast \ + "https://github.com/immanuwell/dockerfile-roast/releases/download/1.7.0/${DROAST_ASSET}" + chmod +x /usr/local/bin/droast + droast --version + + - name: Discover Dockerfiles + id: discover + # shell check instead of hashFiles: the act runner's hashFiles + # evaluation returned empty and silently skipped the job even when + # Dockerfiles existed + run: | + found="$(find . \ + -path ./.git -prune -o -path ./node_modules -prune -o \ + -type f \( -iname 'Dockerfile*' -o -iname '*dockerfile' -o -iname 'Containerfile*' \) \ + -print | head -n 1)" + if [ -n "$found" ]; then + echo "found=true" >> "$GITHUB_OUTPUT" + echo "Dockerfile found: $found" + else + echo "found=false" >> "$GITHUB_OUTPUT" + echo "No Dockerfile in repo - nothing to lint" + fi + - name: Lint Dockerfile(s) + if: ${{ steps.discover.outputs.found == 'true' }} run: | # --no-roast = technical output for CI; --min-severity warning so # info-level findings don't block the PR