-
Notifications
You must be signed in to change notification settings - Fork 26
37 lines (33 loc) · 1.21 KB
/
hadolint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Hadolint
on:
workflow_call:
inputs:
dockerfile:
required: true
type: string
jobs:
hadolint:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Validate ${{ inputs.dockerfile }}
uses: hadolint/[email protected]
with:
dockerfile: ${{ inputs.dockerfile }}
no-fail: true
verbose: true
format: sarif
output-file: ${{ inputs.dockerfile }}.sarif
- name: Upload Hadolint results of ${{ inputs.dockerfile }}
uses: github/codeql-action/[email protected]
with:
# Path to SARIF file relative to the root of the repository
sarif_file: ${{ inputs.dockerfile }}.sarif
# Optional category for the results
# Used to differentiate multiple results for one commit
category: hadolint-${{ inputs.dockerfile }}-validation