Commit afe930e
authored
Simplify workflows (#435)
🚀 Optimize GitHub Actions: Add Path-Based Triggers and Concurrency
Controls
## Summary
This PR significantly optimizes our CI/CD pipeline by implementing
intelligent path-based filtering and adding concurrency controls to
prevent redundant workflow executions.
## Changes Made
🎯 Path-Based Filtering
Added paths triggers to workflows so they only run when relevant files
change:
- components-build-deploy.yml: Only triggers on changes to:
- Component directories (components/*/)
- Deployment manifests (components/manifests/)
- The workflow file itself
- e2e.yml: Only triggers on changes to:
- Components, e2e tests, scripts, agents
- Configuration files (.specify/, agents/)
- frontend-lint.yml: Only triggers on changes to:
- Frontend TypeScript/JavaScript files
- Package management files (package.json, package-lock.json)
- Configuration files (tsconfig.json, eslint.config.mjs)
- go-lint.yml: Only triggers on changes to:
- Go source files in backend/operator
- Go module files (go.mod, go.sum)
##⚡ Concurrency Controls
Added concurrency groups with cancel-in-progress: true to:
- Prevent multiple workflows running simultaneously for the same PR
- Automatically cancel outdated workflow runs when new commits are
pushed
- Reduce resource usage and queue times
##🧹 Workflow Simplification
- Removed redundant change detection job in frontend-lint.yml
- Leveraged GitHub's native path filtering instead of custom change
detection logic
## Benefits
- ⏰ Faster CI: Workflows only run when necessary, reducing overall CI
time
- 💰 Cost Savings: Fewer unnecessary workflow executions = reduced GitHub
Actions usage
- 🔄 Better Developer Experience: No more waiting for irrelevant
workflows to complete
- 🚫 Prevents Conflicts: Concurrency controls eliminate race conditions
from simultaneous runs
## Example Impact
Before: A documentation-only change would trigger all 4 workflows
unnecessarily
After: Documentation changes won't trigger any component workflows
Before: Pushing multiple commits rapidly could run multiple conflicting
workflows
After: Only the latest commit's workflow runs, previous ones are
automatically cancelled
## Testing
- Verified workflow syntax is valid
- Confirmed path patterns cover all relevant file types
- Tested concurrency groups work correctly with PR scenarios
This optimization will make our CI pipeline more efficient while
maintaining the same level of code quality assurance.
---------
Signed-off-by: Nelesh Singla <117123879+nsingla@users.noreply.github.com>1 parent 6605008 commit afe930e
File tree
4 files changed
+84
-26
lines changed- .github/workflows
4 files changed
+84
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
6 | 13 | | |
7 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
8 | 22 | | |
9 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
10 | 28 | | |
11 | 29 | | |
12 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
6 | 14 | | |
7 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
8 | 23 | | |
9 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
10 | 29 | | |
11 | 30 | | |
12 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
6 | 17 | | |
7 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
8 | 30 | | |
9 | 31 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | | - | |
37 | | - | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
6 | 14 | | |
7 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
8 | 24 | | |
9 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
10 | 30 | | |
11 | 31 | | |
12 | 32 | | |
| |||
0 commit comments