• 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:

      1. 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.
      1. 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.
      1. 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.

              gustavolira Gustavo Lira Silva
              gustavolira Gustavo Lira Silva
              RHIDP - Plugins
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: