lint #2013
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # yamllint disable rule:line-length | |
| name: lint | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| detect-changes: | |
| outputs: | |
| actions_any_changed: ${{ steps.changed-files-yaml.outputs.actions_any_changed }} | |
| actions_all_changed_files: ${{ steps.changed-files-yaml.outputs.actions_all_changed_files}} | |
| docker_any_changed: ${{ steps.changed-files-yaml.outputs.docker_any_changed }} | |
| docker_all_changed_files: ${{ steps.changed-files-yaml.outputs.docker_all_changed_files}} | |
| renovate_any_changed: ${{ steps.changed-files-yaml.outputs.renovate_any_changed }} | |
| renovate_all_changed_files: ${{ steps.changed-files-yaml.outputs.renovate_all_changed_files}} | |
| shellscripts_any_changed: ${{ steps.changed-files-yaml.outputs.shellscripts_any_changed }} | |
| shellscripts_all_changed_files: ${{ steps.changed-files-yaml.outputs.shellscripts_all_changed_files}} | |
| terraform_any_changed: ${{ steps.changed-files-yaml.outputs.terraform_any_changed }} | |
| terraform_all_changed_files: ${{ steps.changed-files-yaml.outputs.terraform_all_changed_files}} | |
| yaml_any_changed: ${{ steps.changed-files-yaml.outputs.yaml_any_changed }} | |
| yaml_all_changed_files: ${{ steps.changed-files-yaml.outputs.yaml_all_changed_files}} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Determine what files types have changed | |
| id: changed-files-yaml | |
| uses: tj-actions/changed-files@dcc7a0cba800f454d79fff4b993e8c3555bcc0a8 # v45 | |
| with: | |
| files_yaml: | | |
| actions: | |
| - .github/workflows/** | |
| docker: | |
| - '**/Dockerfile' | |
| renovate: | |
| - .github/renovate.json | |
| - .github/renovate/** | |
| shellscripts: | |
| - '**.sh' | |
| terraform: | |
| - '**.tf' | |
| - '**/.terraform-version' | |
| - '**/.terraform.lock.hcl' | |
| - '.tflint.hcl' | |
| yaml: | |
| - '**.yaml' | |
| commit-messages: | |
| if: ${{ github.event_name == 'pull_request' }} | |
| uses: ppat/github-workflows/.github/workflows/lint-commit-messages.yaml@main | |
| with: | |
| git_ref: ${{ github.head_ref }} | |
| fetch_depth: ${{ github.event.pull_request.commits }} | |
| from: ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} | |
| to: ${{ github.event.pull_request.head.sha }} | |
| github-actions: | |
| needs: [detect-changes] | |
| if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.actions_any_changed == 'true' }} | |
| uses: ppat/github-workflows/.github/workflows/lint-github-actions.yaml@main | |
| with: | |
| git_ref: ${{ github.head_ref || github.ref }} | |
| files: ${{ github.event_name == 'workflow_dispatch' && 'ALL' || needs.detect-changes.outputs.actions_all_changed_files }} | |
| docker-files: | |
| needs: [detect-changes] | |
| if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.docker_any_changed == 'true' }} | |
| uses: ppat/github-workflows/.github/workflows/lint-hadolint.yaml@main | |
| with: | |
| git_ref: ${{ github.head_ref || github.ref }} | |
| files: ${{ github.event_name == 'workflow_dispatch' && 'ALL' || needs.detect-changes.outputs.docker_all_changed_files }} | |
| pre-commit: | |
| uses: ppat/github-workflows/.github/workflows/lint-pre-commit.yaml@main | |
| with: | |
| git_ref: ${{ github.head_ref || github.ref }} | |
| renovate-config-check: | |
| needs: [detect-changes] | |
| if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.renovate_any_changed == 'true' }} | |
| uses: ppat/github-workflows/.github/workflows/lint-renovate-config-check.yaml@main | |
| with: | |
| git_ref: ${{ github.head_ref || github.ref }} | |
| files: ${{ github.event_name == 'workflow_dispatch' && 'ALL' || needs.detect-changes.outputs.renovate_all_changed_files }} | |
| shellcheck: | |
| needs: [detect-changes] | |
| if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.shellscripts_any_changed == 'true' }} | |
| uses: ppat/github-workflows/.github/workflows/lint-shellcheck.yaml@main | |
| with: | |
| git_ref: ${{ github.head_ref || github.ref }} | |
| files: ${{ github.event_name == 'workflow_dispatch' && 'ALL' || needs.detect-changes.outputs.shellscripts_all_changed_files }} | |
| terraform: | |
| needs: [detect-changes] | |
| if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.terraform_any_changed == 'true' }} | |
| uses: ppat/github-workflows/.github/workflows/lint-terraform.yaml@main | |
| with: | |
| git_ref: ${{ github.head_ref || github.ref }} | |
| yaml: | |
| needs: [detect-changes] | |
| if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.yaml_any_changed == 'true' }} | |
| uses: ppat/github-workflows/.github/workflows/lint-yaml.yaml@main | |
| with: | |
| git_ref: ${{ github.head_ref || github.ref }} | |
| files: ${{ github.event_name == 'workflow_dispatch' && 'ALL' || needs.detect-changes.outputs.yaml_all_changed_files }} |