Skip to content

Commit 50c96e8

Browse files
[CI] Add linter workflow for Dockerfiles
1 parent 58d0d13 commit 50c96e8

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/hadolint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Runs linter for Docker files
2+
name: Hadolint
3+
4+
on: workflow_call
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
hadolint:
11+
name: Hadolint
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Clone the git repo
16+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
17+
18+
- name: Run Hadolint
19+
uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
20+
with:
21+
recursive: true
22+
dockerfile: ".github/docker/*Dockerfile"
23+
verbose: true
24+
# ignore pinning apt packages to versions
25+
ignore: DL3008

.github/workflows/pr_push.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,6 @@ jobs:
8383
CodeQL:
8484
needs: [Build]
8585
uses: ./.github/workflows/codeql.yml
86+
Hadolint:
87+
needs: [Build]
88+
uses: ./.github/workflows/hadolint.yml

0 commit comments

Comments
 (0)