2019-10-02 23:17:00 +02:00
|
|
|
name: 'Hadolint Action'
|
2019-10-02 22:50:00 +02:00
|
|
|
description: 'Action that runs Hadolint Dockerfile linting tool'
|
|
|
|
author: 'Bruno Paz'
|
|
|
|
inputs:
|
|
|
|
dockerfile:
|
2021-05-08 13:08:16 +02:00
|
|
|
required: false
|
2019-10-02 22:50:00 +02:00
|
|
|
description: 'The path to the Dockerfile to lint'
|
|
|
|
default: 'Dockerfile'
|
2021-11-18 13:09:22 +01:00
|
|
|
config:
|
|
|
|
required: false
|
|
|
|
description: 'Path to a config file'
|
|
|
|
default:
|
2021-05-31 13:57:42 +02:00
|
|
|
recursive:
|
|
|
|
required: false
|
2021-11-18 13:09:22 +01:00
|
|
|
description:
|
|
|
|
'Search for specified dockerfile recursively, from the project root'
|
|
|
|
default: 'false'
|
|
|
|
output-file:
|
|
|
|
required: false
|
|
|
|
description: 'The path where to save the linting results to'
|
2023-01-17 15:38:26 +01:00
|
|
|
default: "/dev/stdout"
|
2021-11-18 13:09:22 +01:00
|
|
|
|
|
|
|
# standart hadolint options:
|
|
|
|
no-color:
|
|
|
|
required: false
|
|
|
|
description: Don't create colored output.
|
|
|
|
default: 'false'
|
|
|
|
no-fail:
|
|
|
|
required: false
|
|
|
|
description: Never exit with a failure status code
|
|
|
|
default: 'false'
|
|
|
|
verbose:
|
|
|
|
required: false
|
|
|
|
description: Print more information about the running config
|
2021-05-31 13:57:42 +02:00
|
|
|
default: 'false'
|
2021-05-08 13:08:16 +02:00
|
|
|
format:
|
|
|
|
required: false
|
|
|
|
description: |
|
|
|
|
The output format, one of [tty (default) | json | checkstyle |
|
2021-11-18 13:09:22 +01:00
|
|
|
codeclimate | gitlab_codeclimate | codacy | sarif]
|
2021-05-08 13:08:16 +02:00
|
|
|
default: 'tty'
|
|
|
|
failure-threshold:
|
|
|
|
required: false
|
|
|
|
description: |
|
|
|
|
Fail the pipeline only if rules with severity above this threshold are
|
|
|
|
violated. One of [error | warning | info (default) | style | ignore]
|
|
|
|
default: 'info'
|
2021-11-18 13:09:22 +01:00
|
|
|
override-error:
|
|
|
|
required: false
|
|
|
|
description:
|
|
|
|
'A comma separated list of rules whose severity will be `error`'
|
|
|
|
default:
|
|
|
|
override-warning:
|
|
|
|
required: false
|
|
|
|
description:
|
|
|
|
'A comma separated list of rules whose severity will be `warning`'
|
|
|
|
default:
|
|
|
|
override-info:
|
|
|
|
required: false
|
|
|
|
description:
|
|
|
|
'A comma separated list of rules whose severity will be `info`'
|
|
|
|
default:
|
|
|
|
override-style:
|
|
|
|
required: false
|
|
|
|
description:
|
|
|
|
'A comma separated list of rules whose severity will be `style`'
|
|
|
|
default:
|
2021-05-08 13:08:16 +02:00
|
|
|
ignore:
|
|
|
|
required: false
|
2021-11-18 13:09:22 +01:00
|
|
|
description: 'A comma separated string of rules to ignore'
|
2021-05-08 13:08:16 +02:00
|
|
|
default:
|
2021-11-18 13:09:22 +01:00
|
|
|
trusted-registries:
|
2021-05-08 13:08:16 +02:00
|
|
|
required: false
|
2021-11-18 13:09:22 +01:00
|
|
|
description: 'A comma separated list of trusted registry urls'
|
2021-05-08 13:08:16 +02:00
|
|
|
default:
|
|
|
|
|
2019-10-02 22:50:00 +02:00
|
|
|
runs:
|
|
|
|
using: 'docker'
|
|
|
|
image: 'Dockerfile'
|
|
|
|
args:
|
|
|
|
- ${{ inputs.dockerfile }}
|
2021-05-08 13:08:16 +02:00
|
|
|
env:
|
2021-11-18 13:09:22 +01:00
|
|
|
NO_COLOR: ${{ inputs.no-color }}
|
|
|
|
HADOLINT_NOFAIL: ${{ inputs.no-fail }}
|
|
|
|
HADOLINT_VERBOSE: ${{ inputs.verbose }}
|
|
|
|
HADOLINT_FORMAT: ${{ inputs.format }}
|
|
|
|
HADOLINT_FAILURE_THRESHOLD: ${{ inputs.failure-threshold }}
|
|
|
|
HADOLINT_OVERRIDE_ERROR: ${{ inputs.override-error }}
|
|
|
|
HADOLINT_OVERRIDE_WARNING: ${{ inputs.override-warning }}
|
|
|
|
HADOLINT_OVERRIDE_INFO: ${{ inputs.override-info }}
|
|
|
|
HADOLINT_OVERRIDE_STYLE: ${{ inputs.override-style }}
|
2021-05-08 13:08:16 +02:00
|
|
|
HADOLINT_IGNORE: ${{ inputs.ignore }}
|
2021-11-18 13:09:22 +01:00
|
|
|
HADOLINT_TRUSTED_REGISTRIES: ${{ inputs.trusted-registries }}
|
|
|
|
|
|
|
|
HADOLINT_CONFIG: ${{ inputs.config }}
|
2021-05-31 13:57:42 +02:00
|
|
|
HADOLINT_RECURSIVE: ${{ inputs.recursive }}
|
2021-11-18 13:09:22 +01:00
|
|
|
HADOLINT_OUTPUT: ${{ inputs.output-file }}
|
2019-10-02 22:50:00 +02:00
|
|
|
branding:
|
|
|
|
icon: 'layers'
|
|
|
|
color: 'purple'
|