diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 940f540..28ea8a5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,12 +12,13 @@ on: - pom.xml - Containerfile workflow_dispatch: - jobs: lint: runs-on: ubuntu-latest # GitHub-hosted runners: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources steps: - name: Clone uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout - - name: YAML Lint - run: yamllint . # yamllint is pre-installed: https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#tools + - name: Lint files + uses: ./.github/workflows/lint.yaml + with: + yaml: 'true' diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 2ec5b74..268c8b0 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -5,10 +5,17 @@ name: Lint Files on: push: workflow_dispatch: - + workflow_call: + inputs: + yaml: + description: Enable YAML lint + required: false + default: 'true' + type: string jobs: lint: runs-on: ubuntu-latest # GitHub-hosted runners: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources + if: inputs.yaml == 'true' steps: - name: Clone uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout