hadolint-action: Error: No hadolint failure but Actions job fails
No hadolint failure but Actions job fails when executing below actions.
Execution log
Actions yaml (part of hadolint job)
lint-dockerfile:
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- name: hadolint (dockerfile linter)
uses: hadolint/hadolint-action@f988afea3da57ee48710a9795b6bb677cc901183
with:
recursive: true
Workaround: Actions success when setting failure-threshold: "warning"
option.
But even if hadolint fails with info severity, Actions job will succeed😢.
lint-dockerfile:
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- name: hadolint (dockerfile linter)
uses: hadolint/hadolint-action@f988afea3da57ee48710a9795b6bb677cc901183
with:
recursive: true
failure-threshold: "warning"
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 8
- Comments: 16 (4 by maintainers)
Commits related to this issue
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-template by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-github-release by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-coverage-check by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-sonar-scanner by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-box-builder by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-heroku-cli by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-ansible by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-php-cli by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-openssh by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-lessc by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-phing by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-phpmd by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-phpcs by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-lftp by FrankGiesecke 2 years ago
- Handle hidden linter messages https://github.com/hadolint/hadolint-action/issues/60 — committed to final-gene/docker-hub-dpl by FrankGiesecke 2 years ago
- https://github.com/hadolint/hadolint-action/issues/60 — committed to telekom-mms/docker-management-container by michaelamattes 2 years ago
- Make output-file by default to /dev/stdout To fix https://github.com/hadolint/hadolint-action/issues/60 in hadolint-action>v2.0.0 — committed to DracoBlue/hadolint-action by DracoBlue a year ago
The problem seems to be, that some errors/warnings/infos are not displayed in the log. I have a Dockerfile which doesn’t contain any ignore statements. In my first run, my
.hadolint.yaml
only contains the exclusion forDL3018
. If I run Hadolint from CLI, I get the message:But in the CI, no message is displayed but the step fails.
If I add the exclusion for
DL3059
, the CI step succeeds.