chore(ci): Add required checks job for lint swiftlint formatting #6000
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📜 Description
Migrates the
lint-swiftlint-formatting
workflow to usedorny/paths-filter
for conditional execution on pull requests. This involves:on.pull_request.paths
filtering from the workflow.files-changed
job to detect relevant changes using a new filterrun_lint_swiftlint_formatting_for_prs
in.github/file-filters.yml
.lint
job conditional based on thefiles-changed
job's output.lint_swiftlint_formatting-required-check
job to serve as a consistent required check for branch protection rules.💡 Motivation and Context
This change is part of the ongoing effort (see #5951 and #5893) to replace
on.[event].paths
filtering withdorny/paths-filter
across all workflows. The primary motivation is to enable more efficient conditional execution of CI jobs on pull requests while providing a reliable, always-running "required check" for branch protection rules. This ensures that the SwiftLint formatting check only runs when relevant files are modified, but its overall status (passed or skipped) is always reported.Fixes #5963
💚 How did you test it?
The changes are to the CI pipeline itself and will be validated by the CI run of this pull request.
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.#skip-changelog