-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (38 loc) · 968 Bytes
/
pr-verify.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: PR-verify
on:
pull_request:
branches:
- main
jobs:
changed-files:
name: Detect changed dockerfiles
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed dockerfiles
id: changed-files
uses: tj-actions/changed-files@v44
with:
matrix: true
files: |
Dockerfile
lint-dockerfiles:
name: Lint dockerfiles with hadolint
runs-on: ubuntu-latest
needs: [changed-files]
strategy:
matrix:
files: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
max-parallel: 4
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run hadolint
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: ${{ matrix.files }}