Code Monkey home page Code Monkey logo

Comments (2)

mfn avatar mfn commented on September 22, 2024 2

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 🙏🏼

from hadolint-action.

kgrv-me avatar kgrv-me commented on September 22, 2024

Hope I'm not too late to help out.

ISSUE #3 contains a lot of conversation regarding this topic. You have several options:

  1. Using 3rd-party GitHub Action (#3 (comment))
  2. Apparently, setting HADOLINT_RECURSIVE environment variable to true seems to work somewhat (#3 (comment))
  3. If you don't mind using Docker container, I built one (so it's CI platform agnostic) kgrv/hadolint
    It can scan entire directories (including nested) with simple docker run command
docker run --rm -v PATH:/workspace kgrv/hadolint

Integrate this into GitHub workflow with:

- name: Haskell Dockerfile Linter
  run: docker run --rm -v ${PWD}:/workspace kgrv/hadolint

I hope this helps, cheers!

from hadolint-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.