fix(ci): make droast job actually run
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 35s
PR Check / Typecheck (pull_request) Successful in 37s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 5s
PR Check / Dependency audit (pull_request) Failing after 9s
PR Check / Dockerfile lint (droast) (pull_request) Failing after 5s
PR Check / AI code review (opencode) (pull_request) Failing after 12s

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.
This commit is contained in:
Noel Sabia committed 2026-10-18 17:11:31 +02:00
1 parent 5f1d64db90
commit cf6f209ebf
1 file changed
+35 -4
+35 -4
View File
@@ -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