fix(ci): deduplicate calls#1450
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Greptile Overview
Summary
This PR fixes CI workflow duplication by removing redundant push triggers from individual workflow files that were causing the same workflows to run both directly and via workflow_call from the main CI pipeline.
Key Changes:
- Removed
push: branches: [main, staging]triggers frombuild-ecr.yml,docs-embeddings.yml, andtrigger-deploy.yml - Added
workflow_dispatchtriggers to all affected workflows to enable manual execution when needed - Removed path-based filtering from
docs-embeddings.ymlas this is now handled by the main CI workflow
Impact:
The changes ensure workflows only execute once per push through the centralized ci.yml orchestration, eliminating redundant runs while maintaining the ability to manually trigger individual workflows when needed for debugging or maintenance.
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- Score reflects a straightforward infrastructure fix with clear benefits and no logic changes to workflow execution
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| .github/workflows/build-ecr.yml | 5/5 | Removed duplicate push trigger on main/staging branches, now only called via workflow_call from ci.yml, added workflow_dispatch for manual triggering |
| .github/workflows/build-ghcr-build.yml | 5/5 | Added workflow_dispatch trigger for manual execution while maintaining workflow_call functionality |
| .github/workflows/build-ghcr-push.yml | 5/5 | Added workflow_dispatch trigger for manual execution while maintaining workflow_call functionality |
| .github/workflows/docs-embeddings.yml | 5/5 | Removed duplicate push trigger on main/staging with paths filter, now only called via workflow_call from ci.yml, kept workflow_dispatch |
| .github/workflows/trigger-deploy.yml | 5/5 | Removed duplicate push trigger on main/staging branches, now only called via workflow_call from ci.yml, added workflow_dispatch for manual triggering |
Sequence Diagram
sequenceDiagram
participant Developer
participant GitHub
participant CI as ci.yml
participant ECR as build-ecr.yml
participant GHCR_BUILD as build-ghcr-build.yml
participant GHCR_PUSH as build-ghcr-push.yml
participant TRIGGER as trigger-deploy.yml
participant DOCS as docs-embeddings.yml
Note over Developer,GitHub: Push to main/staging branch
Developer->>GitHub: git push origin main/staging
GitHub->>CI: Trigger CI workflow
CI->>CI: Run tests and build
par Parallel execution after tests pass
CI->>ECR: workflow_call build-ecr.yml
and CI->>GHCR_BUILD: workflow_call build-ghcr-build.yml
and CI->>TRIGGER: workflow_call trigger-deploy.yml
end
Note over ECR,TRIGGER: All workflows run in parallel
ECR->>ECR: Build & push ECR images + Deploy ECS
GHCR_BUILD->>GHCR_BUILD: Build GHCR images (no push)
TRIGGER->>TRIGGER: Deploy Trigger.dev
Note over CI,GHCR_PUSH: Wait for ECR deployment completion
CI->>GHCR_PUSH: workflow_call build-ghcr-push.yml
GHCR_PUSH->>GHCR_PUSH: Push GHCR images & create manifests
Note over CI,DOCS: Final steps
CI->>CI: Apply database migrations
CI->>DOCS: workflow_call docs-embeddings.yml
DOCS->>DOCS: Process documentation embeddings
5 files reviewed, no comments
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Stop double calling
Fixes #(issue)
Type of Change
Testing
Manual
Checklist