-
Notifications
You must be signed in to change notification settings - Fork 20
perf: Enhance CI/CD workflows to trigger on specific file changes for bette… #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
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 enhances CI/CD workflow efficiency by adding path-based filtering to trigger workflows only when relevant files change. While the path filters are correctly configured, the implementation is incomplete as it omits necessary branch filters, causing workflows to trigger on all branches rather than specific target branches as indicated by the workflow comments.
Key Changes
- Added path-based filtering to
azd-ai-template-validation.ymlto trigger only on changes toazure.yaml,infra/**, or the workflow file itself - Added path-based filtering to
assign-workspace-admins.ymlto trigger only on changes to Fabric/utils scripts or the workflow file itself
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/azd-ai-template-validation.yml |
Adds push/pull_request triggers with path filters for azure.yaml, infra directory, and workflow file, but missing branch filters mentioned in comments |
.github/workflows/assign-workspace-admins.yml |
Adds push/pull_request triggers with path filters for Fabric and utils scripts, but missing branch filters mentioned in comments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| push: | ||
| paths: | ||
| - "azure.yaml" | ||
| - "infra/**" | ||
| - ".github/workflows/azd-ai-template-validation.yml" |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The push trigger is missing branch filters. According to the comment on line 2, this workflow should only run when commits are pushed to "pre-deploy-alguadam", but the current configuration will trigger on pushes to ANY branch. This could lead to unnecessary workflow runs and resource consumption.
Consider adding a branches filter under the push trigger, similar to how it's done in azure-dev.yml. For example:
push:
branches:
- pre-deploy-alguadam
paths:
- "azure.yaml"
- "infra/**"
- ".github/workflows/azd-ai-template-validation.yml"| pull_request: | ||
| paths: | ||
| - "azure.yaml" | ||
| - "infra/**" | ||
| - ".github/workflows/azd-ai-template-validation.yml" |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull_request trigger is missing branch filters. While the path filters are correct, the workflow will now trigger on pull requests targeting ANY branch. This is inconsistent with the typical pattern seen in azure-dev.yml where pull requests are filtered to target specific branches (e.g., main).
Consider adding a branches filter to limit which target branches will trigger this workflow. For example:
pull_request:
branches:
- main
paths:
- "azure.yaml"
- "infra/**"
- ".github/workflows/azd-ai-template-validation.yml"| push: | ||
| paths: | ||
| - "infra/scripts/fabric/**" | ||
| - "infra/scripts/utils/**" | ||
| - ".github/workflows/assign-workspace-admins.yml" |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The push trigger is missing branch filters. The comment on line 3 states this workflow should trigger "on push to main/master", but the current configuration will trigger on pushes to ANY branch. This is inconsistent with the stated intent and could cause unnecessary workflow runs.
Consider adding a branches filter under the push trigger to match the comment's description. For example:
push:
branches:
- main
- master
paths:
- "infra/scripts/fabric/**"
- "infra/scripts/utils/**"
- ".github/workflows/assign-workspace-admins.yml"| pull_request: | ||
| paths: | ||
| - "infra/scripts/fabric/**" | ||
| - "infra/scripts/utils/**" | ||
| - ".github/workflows/assign-workspace-admins.yml" |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull_request trigger is missing branch filters. While the path filters are correct, this will trigger on pull requests targeting ANY branch. Following the pattern in azure-dev.yml (lines 14-20), it's a best practice to specify which target branches should trigger the workflow.
Consider adding a branches filter to limit which target branches will trigger this workflow. For example:
pull_request:
branches:
- main
paths:
- "infra/scripts/fabric/**"
- "infra/scripts/utils/**"
- ".github/workflows/assign-workspace-admins.yml"
…r efficiency
Purpose
Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information