Skip to content

Commit

Permalink
implement hadolint
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-sommer committed Mar 27, 2024
1 parent 06fc31e commit 591718c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint
on: pull_request

jobs:
hadolint:
runs-on: ubuntu-latest
name: Hadolint-your-PR
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v42
with:
# Pass what names/filters you want to catch
files: |
**/Dockerfile.*
separator: " "
# Only run if expected files are changed and pass these as input
- uses: jbergstroem/hadolint-gh-action@v1
if: steps.changed-files.outputs.any_changed == 'true'
with:
dockerfile: "${{ steps.changed-files.outputs.other_changed_files }}"
10 changes: 10 additions & 0 deletions .hadolint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Lint
on: pull_request

jobs:
hadolint:
runs-on: ubuntu-latest
name: Hadolint
steps:
- uses: actions/checkout@v4
- uses: jbergstroem/hadolint-gh-action@v1

0 comments on commit 591718c

Please sign in to comment.