-
-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (46 loc) · 1.42 KB
/
docker-linter.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# hadoint is a Dockerfile linter written in Haskell
# https://github.com/hadolint/hadolint
name: Docker Linter
on:
push:
branches: [ "master" ]
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
pull_request:
branches: [ "master" ]
workflow_dispatch:
schedule:
- cron: '40 9 * * 6'
permissions:
contents: read
jobs:
hadolint:
name: Run hadolint
runs-on: ubuntu-latest
permissions:
contents: read # for actions/checkout
security-events: write # for github/codeql-action/upload-sarif
steps:
- name: Harden Runner
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: Lint
uses: hadolint/hadolint-action@f988afea3da57ee48710a9795b6bb677cc901183
with:
dockerfile: ./Dockerfile
format: sarif
output-file: hadolint-results.sarif
no-fail: true
- name: Upload Results
uses: github/codeql-action/upload-sarif@cc7986c02bac29104a72998e67239bb5ee2ee110
with:
sarif_file: hadolint-results.sarif
wait-for-processing: true