forked from ZoeyVid/NPMplus
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (30 loc) · 1.12 KB
/
Copy pathdockerlint.yml
File metadata and controls
30 lines (30 loc) · 1.12 KB
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
name: dockerlint
on:
push:
branches:
- develop
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
dockerlint:
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: dockerlint
run: |
curl -sSfL https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-$(uname -m) -o hadolint
chmod +x hadolint
for file in $(find -name "*Dockerfile"); do
# DL3018 warning: Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
# DL3003 warning: Use WORKDIR to switch to a directory
# DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`
./hadolint "$file" --ignore DL3018 --ignore DL3003 --ignore DL3013 | tee -a hadolint.log
done
if [ -s hadolint.log ]; then
exit 1
fi