Skip to content
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

hadolint-action builds out of turn #86

Open
anoronh4 opened this issue Jun 27, 2024 · 0 comments
Open

hadolint-action builds out of turn #86

anoronh4 opened this issue Jun 27, 2024 · 0 comments

Comments

@anoronh4
Copy link

i have a github action workflow where i want to start by maximizing the build space and then running all actions after. so my workflow has :

  dockerfile-validate-build:
    runs-on: ubuntu-latest
    name: dockerfile-build
    needs: [dockerfile-changes]
    if: needs.dockerfile-changes.outputs.docker-images != '[]'
    strategy:
      fail-fast: false
      matrix:
        tags: ["${{ fromJson(needs.dockerfile-changes.outputs.docker-images) }}"]
    steps:
      - name: Maximize build space
        uses: easimon/maximize-build-space@master
        with:
          build-mount-path: /var/lib/docker/
          remove-dotnet: 'true'
          remove-android: 'true'
          remove-haskell: 'true'
          remove-codeql: 'true'
      - name: Restart docker
        run: sudo service docker restart
      - name: Checkout
        uses: actions/checkout@v4
      - name: Hadolint
        uses: hadolint/[email protected]
        with:
          dockerfile: containers/${{ matrix.tags }}/Dockerfile
          verbose: true

However, for whatever reason, hadolint builds before any of the other steps. so after docker is restarted, the hadolint step runs and fails
Screenshot 2024-06-27 at 4 51 42 PM

It doesn't seem like i can control when hadolint gets built through the order of steps in my workflow. i was wondering why this is happening and how i can control the order of events here?

@anoronh4 anoronh4 changed the title hadolint builds out of turn hadolint-action builds out of turn Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant