Skip to content

shree007 docker pipeline #16

shree007 docker pipeline

shree007 docker pipeline #16

name: docker-github-actions
run-name: ${{ github.actor }} docker pipeline
on:
push:
branches:
- "create-github-pipeline-for-docker"
- "main"
pull_request:
jobs:
lint:
name: lint dockerfiles
runs-on: [ubuntu-latest]
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install hadolint
run: |
sudo wget -O /usr/local/bin/hadolint \
https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64
sudo chmod +x /usr/local/bin/hadolint
- name: Find and Lint Dockerfiles
run: |
find . -name "Dockerfile" | while read dockerfile; do
echo "Linting $dockerfile"
hadolint "$dockerfile"
done