pull_request #6551
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
| name: "Workflows & Scripts" | |
| # Customize run name to show selected linters in manual runs (e.g., "Validate: actionlint + yamllint") | |
| run-name: >- | |
| ${{ | |
| github.event_name == 'workflow_dispatch' && | |
| format('Validate: {0}{1}{2}', | |
| inputs.run_actionlint && 'actionlint' || '', | |
| inputs.run_actionlint && inputs.run_shellcheck && ' + ' || '', | |
| inputs.run_shellcheck && 'shellcheck' || '' | |
| ) || | |
| github.event_name | |
| }} | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| run_actionlint: | |
| description: 'Run actionlint' | |
| type: boolean | |
| default: true | |
| run_shellcheck: | |
| description: 'Run shellcheck' | |
| type: boolean | |
| default: true | |
| permissions: | |
| contents: read | |
| # Separate concurrency groups for manual vs automatic runs | |
| # Manual: grouped by workflow name (cancels previous manual runs only) | |
| # Automatic: grouped by ref (cancels previous runs on same branch/PR) | |
| concurrency: | |
| group: >- | |
| ${{ | |
| github.event_name == 'workflow_dispatch' && | |
| format('{0}-manual', github.workflow) || | |
| format('{0}-{1}', github.workflow, github.ref) | |
| }} | |
| cancel-in-progress: true | |
| jobs: | |
| workflows: | |
| name: "Validate Workflows" | |
| runs-on: ${{ vars.RUNS_ON_MASTER_AMD64 || vars.RUNS_ON_AMD64 || 'ubuntu-24.04' }} | |
| timeout-minutes: 10 | |
| if: >- | |
| github.event_name == 'workflow_dispatch' && inputs.run_actionlint || | |
| github.event_name == 'pull_request' | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 | |
| if: github.event_name == 'pull_request' | |
| id: changes | |
| with: | |
| filters: | | |
| workflows: | |
| - '.github/workflows/**' | |
| - uses: reviewdog/action-actionlint@dbe5299849118fd6f099ba563d263d770955a64a # v1.73.2 | |
| if: >- | |
| github.event_name == 'workflow_dispatch' || | |
| steps.changes.outputs.workflows == 'true' | |
| with: | |
| github_token: ${{ github.token }} | |
| reporter: ${{ github.event_name == 'workflow_dispatch' && 'local' || 'github-pr-review' }} | |
| fail_level: error | |
| filter_mode: ${{ github.event_name == 'workflow_dispatch' && 'nofilter' || 'diff_context' }} | |
| shellcheck: | |
| name: "Validate Shell Scripts" | |
| runs-on: ${{ vars.RUNS_ON_MASTER_AMD64 || vars.RUNS_ON_AMD64 || 'ubuntu-24.04' }} | |
| timeout-minutes: 10 | |
| if: >- | |
| github.event_name == 'workflow_dispatch' && inputs.run_shellcheck || | |
| github.event_name == 'pull_request' | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 | |
| if: github.event_name == 'pull_request' | |
| id: changes | |
| with: | |
| filters: | | |
| scripts: | |
| - '**/*.sh' | |
| - uses: reviewdog/action-shellcheck@0722bbdb0d47f04c1b53b8734d2422ac63a45ec6 # v1.32.1 | |
| if: >- | |
| github.event_name == 'workflow_dispatch' || | |
| steps.changes.outputs.scripts == 'true' | |
| with: | |
| github_token: ${{ github.token }} | |
| reporter: ${{ github.event_name == 'workflow_dispatch' && 'local' || 'github-pr-review' }} | |
| fail_level: error | |
| filter_mode: ${{ github.event_name == 'workflow_dispatch' && 'nofilter' || 'diff_context' }} | |
| shellcheck_flags: "-P SCRIPTDIR -x" | |
| pattern: "*.sh" | |