Commit d96efbc 1 parent f4f51c4 commit d96efbc Copy full SHA for d96efbc
File tree 1 file changed +20
-5
lines changed
1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,29 @@ run-name: ${{ github.actor }} docker pipeline
5
5
on :
6
6
push :
7
7
branches :
8
- - " *"
8
+ - " create-github-pipeline-for-docker"
9
+ - " main"
9
10
pull_request :
10
11
11
12
jobs :
12
13
lint :
13
14
name : lint dockerfiles
14
- runs-on : ubuntu-test
15
+ runs-on : [ ubuntu-latest]
15
16
steps :
16
- - name : Checkout Code
17
- uses : actions/checkout@v3
18
-
17
+ - name : Checkout Code
18
+ uses : actions/checkout@v3
19
+ - name : Install hadolint
20
+ run : |
21
+ sudo wget -O /usr/local/bin/hadolint \
22
+ https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64
23
+ sudo chmod +x /usr/local/bin/hadolint
24
+ - name : Find and Lint Dockerfiles
25
+ run : |
26
+ find . -name "Dockerfile" | while read dockerfile; do
27
+ echo "Linting $dockerfile"
28
+ hadolint "$dockerfile" || echo "Warnings found in $dockerfile"
29
+ done
30
+
31
+
32
+
33
+
You can’t perform that action at this time.
0 commit comments