-
Story
-
Resolution: Unresolved
-
Normal
-
1.6.0
-
5
-
False
-
-
False
-
-
-
RHDH Plugins 3271, RHDH Plugins 3272
This task aims to optimize the PR workflow (pr.yaml) by integrating the existing image and change verification logic from pr-build-image.yaml.
Changes Implemented:
- Reused the existing check logic
-
- The image existence and relevant changes check, which was already present in pr-build-image.yaml, has now been replicated in pr.yaml to avoid unnecessary builds.
- This prevents redundant executions when an image is already available and no relevant changes are detected.
- Created a custom GitHub Action
-
- A new reusable GitHub Action (check-image-and-changes) was introduced to handle this logic efficiently across multiple workflows.
- This ensures that both pr-build-image.yaml and pr.yaml benefit from the same logic without code duplication.
- Refactored pr.yaml for efficiency
-
- Steps that do not require the image check (Prettier and Lint) were extracted into a separate job (linting).
- Other jobs (build and test) now depend on the check, ensuring they only run when necessary.
Expected Outcome:
- Reduced workflow execution time by skipping unnecessary steps.
- Improved maintainability by centralizing image and changes verification logic.
- Ensured consistency between pr-build-image.yaml and pr.yaml.