safasf
This commit is contained in:
parent
8af66605ae
commit
efbcafe0db
20
.github/workflows/dockerfile.yml
vendored
20
.github/workflows/dockerfile.yml
vendored
@ -13,18 +13,18 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
# - name: Installing dependencies..
|
||||
# run: |
|
||||
# # Fix untill hadolint it available by downstream
|
||||
# if ! apt-cache search hadolint | grep -qP "^hadolint -"; then
|
||||
# # Install hadolint if not already installed through apt
|
||||
# if ! apt list --installed | grep -qP "^hadolint -"; then
|
||||
# if ! apt-cache search hadolint | grep -qP "^hadolint -.*"; then { if command -v wget >/dev/null; then apt install -y wget; fi ;} && wget https://github.com/hadolint/hadolint/releases/download/v1.17.5/hadolint-Linux-x86_64 -O /usr/bin/hadolint && { [ ! -x hadolint ] && chmod +x /usr/bin/hadolint ;}; elif apt-cache search hadolint | grep -qP "^hadolint -.*"; then apt install -y hadolint; fi
|
||||
# fi
|
||||
# fi
|
||||
- name: Installing dependencies..
|
||||
run: |
|
||||
# Fix untill hadolint it available by downstream
|
||||
if ! apt-cache search hadolint | grep -qP "^hadolint -"; then
|
||||
# Install hadolint if not already installed through apt
|
||||
if ! apt list --installed | grep -qP "^hadolint -"; then
|
||||
if ! apt-cache search hadolint | grep -qP "^hadolint -.*"; then { if command -v wget >/dev/null; then apt install -y wget; fi ;} && wget https://github.com/hadolint/hadolint/releases/download/v1.17.5/hadolint-Linux-x86_64 -O /usr/bin/hadolint && { [ ! -x hadolint ] && chmod +x /usr/bin/hadolint ;}; elif apt-cache search hadolint | grep -qP "^hadolint -.*"; then apt install -y hadolint; fi
|
||||
fi
|
||||
fi
|
||||
- name: Linting..
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE" && for file in $(git ls-tree --name-only -r ${{ github.sha }} | grep '\.Dockerfile$'); do
|
||||
printf 'checking dockerfile %s using hadolint\n' "$file"
|
||||
docker run hadolint:latest hadolint "$file"
|
||||
hadolint "$file"
|
||||
done
|
Loading…
Reference in New Issue
Block a user