-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to lint multiple dockerfiles, without specifying the action for each? #54
Comments
Hope I'm not too late to help out. ISSUE #3 contains a lot of conversation regarding this topic. You have several options:
Integrate this into GitHub workflow with:
I hope this helps, cheers! |
Ah,thanks! Totally forgot about this one. I made a super-weird workaround: name: Lint Docker files
on:
push:
paths:
- .github/workflows/docker_lint.yaml
- .hadolint.yaml
- Dockerfile*
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install hadolint
run: |
docker pull hadolint/hadolint:latest
container_id=$(docker create hadolint/hadolint)
docker cp $container_id:/bin/hadolint .
- run: ./hadolint --version
- run: ./hadolint Dockerfile*
Given what you wrote, it feels most natural to just go with https://github.com/jbergstroem/hadolint-gh-action to me, will check it out. Since I could work it around already and more options are on the table and no one seems to work on the issues reporting here anyway -> closing! Thanks 🙏🏼 |
With the version on the terminal, I can run it like so and get multiple files linted:
But with the action, I can't get it working:
produces
It acts like I would use single quotes in bash to prevent wildcard expansion:
The text was updated successfully, but these errors were encountered: