Skip to content

Commit 554c514

Browse files
committed
Add Dockerfile linter
1 parent 1af2ddf commit 554c514

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
# See https://github.com/hadolint/hadolint
3+
name: Run linter on Dockerfile
4+
5+
on:
6+
push:
7+
workflow_dispatch:
8+
9+
jobs:
10+
linter:
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- name: Install docker
17+
run: |
18+
if ! which docker ; then
19+
apt-get update -y
20+
apt-get install -y --no-install-recommends docker.io
21+
fi
22+
23+
- name: Lint dockerfile
24+
run: docker run --rm -i ghcr.io/hadolint/hadolint hadolint --failure-threshold error - < Dockerfile
25+
continue-on-error: false

0 commit comments

Comments
 (0)