pin the karancode/yamllint-github-action GH Action to a specific version #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |