Action for checking scripts with Hadolint.
Create file .github/workflows/hadolint.yml
.
Add next code to it:
name: CI
on:
push:
branches: [master, develop]
pull_request:
branches: [master]
jobs:
Hadolint:
name: Hadolint
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v3
- name: Check dockerfiles with Hadolint
uses: essentialkaos/hadolint-action@v1
with:
format: json
varbose: true
strict-labels: true
failure-threshold: warning
trusted-registry: repo.domain.com
files: alpine311.docker alpine312.docker
Option | Description | Value |
---|---|---|
files |
List of dockerfiles to check | Paths |
version |
Version of Hadolint | Version in semver notation |
format |
The output format for the results | tty json checkstyle codeclimate gitlab_codeclimate codacy sonarqube |
varbose |
Enables verbose logging | Boolean |
strict-labels |
Do not permit labels other than specified in label-schema | Boolean |
failure-threshold |
Exit with failure code only when rules with a severity equal to or above given | error warning info style ignore none |
trusted-registry |
A docker registry to allow to appear in FROM instructions | String |