Skip to content

Commit d96efbc

Browse files
committed
dec-18 lint docker file
1 parent f4f51c4 commit d96efbc

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/docker-pipeline.yaml

+20-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,29 @@ run-name: ${{ github.actor }} docker pipeline
55
on:
66
push:
77
branches:
8-
- "*"
8+
- "create-github-pipeline-for-docker"
9+
- "main"
910
pull_request:
1011

1112
jobs:
1213
lint:
1314
name: lint dockerfiles
14-
runs-on: ubuntu-test
15+
runs-on: [ubuntu-latest]
1516
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+

0 commit comments

Comments
 (0)