Commit a84b6a5 1 parent f4f51c4 commit a84b6a5 Copy full SHA for a84b6a5
File tree 1 file changed +34
-5
lines changed
1 file changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,43 @@ 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
+ build :
31
+ name : Build multi arch docker image
32
+ runs-on : [ubuntu-latest]
33
+ steps :
34
+ - name : Checkout code
35
+ uses : actions/checkout@v3
36
+
37
+ - name : Set up QEMU for multi-arch build
38
+ uses : docker/setup-qemu-action@v2
39
+ with :
40
+ platforms : " linux/amd64,linux/arm64"
41
+
42
+ - name : Setup docker buildx
43
+ uses : docker/setup-buildx-action@v2
44
+
45
+
46
+
47
+
You can’t perform that action at this time.
0 commit comments