Skip to content

pin the karancode/yamllint-github-action GH Action to a specific version #25

pin the karancode/yamllint-github-action GH Action to a specific version

pin the karancode/yamllint-github-action GH Action to a specific version #25

Workflow file for this run

---
name: Dockerfile Validation
on: [push, workflow_dispatch]
jobs:
docker-check:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/[email protected]
- name: "Check if Dockerfile exist first"
id: check_files
uses: andstor/file-existence-action@v2
with:
files: "Dockerfile"
# Rules at https://github.com/hadolint/hadolint#rules
# hadolint/hadolint-action is causing issue with act: https://github.com/hadolint/hadolint/issues/823
- name: Validate Dockerfile
if: steps.check_files.outputs.files_exists == 'true'
run: docker run -v "$(pwd)":"/files" hadolint/hadolint:v2.12.0 hadolint /files/Dockerfile