Skip to content

Limit workflow triggers to relevant path changes#1858

Open
brendandburns wants to merge 1 commit into
masterfrom
relevant
Open

Limit workflow triggers to relevant path changes#1858
brendandburns wants to merge 1 commit into
masterfrom
relevant

Conversation

@brendandburns

Copy link
Copy Markdown
Contributor

Summary

Add path filters to commit-triggered GitHub Actions workflows so they run only when relevant files are modified.

Changes

  • Add paths filters to push and pull_request in .github/workflows/codeql-analysis.yml
  • Add paths filters to pull_request in .github/workflows/buildtest.yaml
  • Add paths filters to push in .github/workflows/docfx.yaml
  • Add paths filters to push in .github/workflows/draft.yaml

Notes

  • schedule in CodeQL and workflow_dispatch in Docfx are unchanged.
  • .github/workflows/nuget.yaml is release-triggered and intentionally unchanged.

Why

This reduces unnecessary CI load and shortens feedback time by skipping workflow runs for unrelated changes.

Copilot AI review requested due to automatic review settings July 23, 2026 19:30
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 23, 2026
@kubernetes-prow
kubernetes-prow Bot requested a review from tg123 July 23, 2026 19:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds paths filters to multiple GitHub Actions workflows so they only trigger on changes that are likely to affect their outputs, reducing unnecessary CI runs.

Changes:

  • Add paths filters to push/pull_request triggers for CodeQL analysis.
  • Add paths filters to PR-triggered build/test workflow.
  • Add paths filters to Docfx and Draft Release workflows on push.
Show a summary per file
File Description
.github/workflows/draft.yaml Restricts draft release workflow runs to source/test/build-relevant changes.
.github/workflows/docfx.yaml Restricts Docfx workflow runs to documentation/source/readme changes.
.github/workflows/codeql-analysis.yml Restricts CodeQL runs to code/build configuration changes (plus workflow self-changes).
.github/workflows/buildtest.yaml Restricts PR build/test runs to code/e2e/build configuration changes (plus workflow self-changes).

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (1)

.github/workflows/codeql-analysis.yml:35

  • The new pull_request.paths filter also omits .editorconfig. If a PR only changes analyzer/style config, CodeQL would be skipped; include .editorconfig to ensure scanning reflects updated analysis settings.
      - 'Directory.*'
      - 'global.json'
      - 'nuget.config'
  • Files reviewed: 4/4 changed files
  • Comments generated: 4
  • Review effort level: Low

Comment on lines +16 to +18
- 'Directory.*'
- 'global.json'
- 'nuget.config'
Comment on lines +7 to +10
- 'doc/**'
- 'src/**'
- 'README.md'
- '.github/workflows/docfx.yaml'
Comment on lines +18 to +20
- 'Directory.*'
- 'global.json'
- 'nuget.config'
Comment on lines +179 to +182
- 'Directory.*'
- 'CodeCoverage.runsettings'
- 'global.json'
- 'nuget.config'

@tg123 tg123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM

editorconfig is nice to add the list

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 25, 2026
@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, tg123

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [brendandburns,tg123]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow

Copy link
Copy Markdown

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants