Skip to content

feat: orchestrate PR validation jobs through pr-validation reusable workflow #380

Description

@gandalf-at-lerian

Request Type

Refactor / simplification

Affected Workflow (if applicable)

Utilities (changed-paths, pr-validation, slack-notify, api-dog-e2e-tests)

Problem / Motivation

Today repositories can run several independent validation workflows when a pull request is opened. A concrete example is LerianStudio/go-boilerplate-ddd PR #33 checks: https://github.com/LerianStudio/go-boilerplate-ddd/pull/33/checks

This spreads PR validation orchestration across multiple caller workflows and makes it harder to standardize required checks, ordering, inputs, and future changes across repositories.

Proposed Solution

Unify all jobs that run on PR opening under a pr-validation reusable workflow.

pr-validation should act as the orchestrator for PR checks while preserving the specificity of each reusable workflow it calls. In practice:

  • Keep language/security/repository-specific validations implemented in their own reusable workflows.
  • Have pr-validation call and coordinate those reusable workflows from one entrypoint.
  • Expose inputs needed by caller repositories to enable/disable or configure specific validation families.
  • Preserve backward-compatible defaults where possible so repositories can migrate incrementally.
  • Make the final required-check surface clearer for branch protection.

Alternatives Considered

Keeping the current model with each repository wiring PR validations independently. This works, but it duplicates orchestration and makes organization-wide changes slower and more error-prone.

Example Usage

name: PR Validation

on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]

jobs:
  pr-validation:
    uses: LerianStudio/github-actions-shared-workflows/.github/workflows/pr-validation.yml@main
    with:
      enable_go_validation: true
      enable_security_scan: true
      enable_pr_analysis: true

Would This Be a Breaking Change?

Unsure

Checklist

  • I searched existing issues and this is not a duplicate.
  • This feature aligns with the repository's goal of providing reusable, organization-wide workflows.

Additional Context

Originated from DevOps task MAP-969: https://map.benedita.lerian.net/tarefas/969

Requested in Slack by Bedatty.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvement requeststaleNo recent activity — will be closed if not updated

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions