apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: hadolint-lint
  labels:
    dagweave.io/catalog-item: hadolint-lint
  annotations:
    dagweave.io/catalog-version: "1.0.0"
    dagweave.io/catalog-category: "CI/CD"
spec:
  entrypoint: lint
  templates:
    - name: lint
      inputs:
        parameters:
          - name: dockerfile
            default: "/work/Dockerfile"
          - name: failure-threshold
            default: "warning"
      container:
        # hadolint/hadolint:v2.15.1
        image: hadolint/hadolint@sha256:32dac94127fd60b7b7e3fbfc65e1383b9b5e25c9bfd7b8536de7a539fe68a12d
        command: [/bin/hadolint]
        args:
          - --no-color
          - --failure-threshold
          - "{{inputs.parameters.failure-threshold}}"
          - "{{inputs.parameters.dockerfile}}"
        resources:
          requests:
            cpu: 50m
            memory: 64Mi
          limits:
            memory: 256Mi
