Skip to content

ci: move Dockerfile linting from Woodpecker to GitHub Actions - #83

Merged
modem7 merged 3 commits into
masterfrom
move-hadolint-to-github
Aug 3, 2026
Merged

ci: move Dockerfile linting from Woodpecker to GitHub Actions#83
modem7 merged 3 commits into
masterfrom
move-hadolint-to-github

Conversation

@modem7

@modem7 modem7 commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds `.github/workflows/lint.yml`, running hadolint via `hadolint/hadolint-action@v3.4.0` on push/PR/dispatch, scoped to `Dockerfile` changes.
  • Removes the `lint-dockerfile` step from `.woodpecker.yml` (and the now-unneeded `depends_on` on `build-and-push`).

Moves the lint check to PR time (catches Dockerfile issues before merge) instead of at deploy time in Woodpecker (after merge, when a build attempt is already wasted).

Note: the existing DL3025 warning (Use arguments JSON notation for CMD and ENTRYPOINT arguments) on Dockerfile:11 is not fixed here — this PR only relocates the lint stage, so the new GitHub Actions job will fail the same way Woodpecker currently does until that's addressed separately.

Test plan

  • Validated YAML syntax of both files
  • Ran `hadolint` locally against `Dockerfile` to confirm it still reports DL3025 (parity with current Woodpecker behavior)
  • Confirm the new `Lint Dockerfile` GitHub Actions check appears on this PR

Runs hadolint as a PR-time GitHub Actions check instead of a
Woodpecker step, so Dockerfile lint issues are caught before merge
rather than at deploy time. Woodpecker's build-and-push no longer
depends on a lint step.
modem7 added 2 commits August 3, 2026 10:48
curl -f already returns a non-zero exit code on HTTP error responses,
so the shell-form '|| exit 1' was redundant. Switching to JSON array
notation removes the need for a shell and satisfies hadolint's
DL3025 check.
hadolint/hadolint-action@v3.4.0 bundles hadolint v2.15.0, which has a
false positive (DL3066) on 'USER $UID' that's fixed in v2.15.1.
Running hadolint/hadolint:latest-alpine directly (matching what
Woodpecker used) avoids depending on the action's version lag.
@modem7
modem7 merged commit 9abf92f into master Aug 3, 2026
4 checks passed
@modem7
modem7 deleted the move-hadolint-to-github branch August 3, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant