Skip to content

essentialkaos/hadolint-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Action for checking scripts with Hadolint.

Usage

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

License

Apache License, Version 2.0