Skip to content

[Maintenance][CI] Add monorepo split action#18749

Merged
GSadee merged 1 commit intoSylius:2.3from
NoResponseMate:maintenance/split-action
Jan 27, 2026
Merged

[Maintenance][CI] Add monorepo split action#18749
GSadee merged 1 commit intoSylius:2.3from
NoResponseMate:maintenance/split-action

Conversation

@NoResponseMate
Copy link
Copy Markdown
Contributor

@NoResponseMate NoResponseMate commented Jan 26, 2026

Q A
Branch? 2.3
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets -
License MIT

Summary by CodeRabbit

  • Chores
    • Added GitHub Actions workflow automation for package splitting and distribution.
    • Introduced build script to generate package matrix configuration for automated package management.

✏️ Tip: You can customize this high-level summary in your review settings.

@NoResponseMate NoResponseMate requested review from a team as code owners January 26, 2026 15:06
@NoResponseMate NoResponseMate added DX Issues and PRs aimed at improving Developer eXperience. Maintenance CI configurations, READMEs, releases, etc. CI labels Jan 26, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough

Walkthrough

Introduces GitHub Actions infrastructure for automated package splitting. A new PHP script generates a matrix by scanning Sylius source subdirectories (components, bundles, abstractions) and mapping them to repository names. A new workflow orchestrates matrix generation and iteratively executes package splitting for each module via an external action.

Changes

Cohort / File(s) Summary
Matrix Generation Script
.github/scripts/generate-split-matrix.php
PHP script that scans src/Sylius/Component, src/Sylius/Bundle, and src/Sylius/Abstraction directories, constructs JSON objects with directory and repository fields, sorts by repository name, and outputs JSON matrix
Package Split Workflow
.github/workflows/packages_split.yaml
GitHub Actions workflow with prepare job to execute matrix generation script and split_packages job to iterate over matrix (max 20 parallel) and invoke SyliusLabs/SplitPackageAction for each package using branch/tag inputs and SPLIT_TOKEN secret

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Packages split with matrix so clean,
Components, bundles, a workflow serene,
From Sylius source to repos so bright,
Automation dances through actions tonight!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and accurately describes the main change: adding a monorepo split action to the CI/CD workflow, which aligns with the two new files introducing split package automation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In @.github/scripts/generate-split-matrix.php:
- Around line 5-16: The docblock claims "Excludes Behat directory" but the
scanning logic that builds the matrix for "Component", "Bundle", and
"Abstraction" directories does not filter out Behat folders; update the
directory scanning loops that generate matrix entries (the loops that traverse
src/Sylius/Component, src/Sylius/Bundle, src/Sylius/Abstraction) to skip any
directory whose basename equals "Behat" (or whose path contains "/Behat/")
before adding it to the output, or alternatively remove/update the docblock to
match the current behavior if you prefer not to exclude Behat directories.

In @.github/workflows/packages_split.yaml:
- Around line 3-13: Add a validation step at the start of the prepare job that
checks the workflow_dispatch inputs branch and tag and fails early if both are
empty: inspect github.event.inputs.branch and github.event.inputs.tag and, if
both are unset/empty, echo a clear error and exit 1 (so the job fails fast).
Name the step something like "Validate inputs" and use an if-less run step or an
always-needed check in prepare to enforce this validation before any
checkout/split logic runs so you prevent silent/invalid runs when neither branch
nor tag is provided.
- Around line 19-25: The checkout step currently uses actions/checkout@v4
without specifying the target ref, so the repo is always checked out at the
default branch; update the checkout step (actions/checkout@v4) to include a ref
parameter that uses the workflow input or environment variable for the intended
branch or tag (the same value you pass to the generate-split-matrix.php run
step) so the script (generate-split-matrix.php) operates on the correct
commit/branch/tag; ensure the matrix step still reads that ref (via the existing
id "matrix" or workflow inputs) so the generated packages reflect the
checked-out ref.
- Around line 40-48: The workflow references an unverified action
SyliusLabs/SplitPackageAction@v1.0; confirm the action repository and ref are
correct and accessible (or replace with a verified marketplace action), and
ensure the inputs match the action's expected input names: directory,
repository, branch, tag, token; if the action is private, update the uses to the
correct owner/repo@ref and add authentication (appropriate PAT in secrets) with
required scopes and verify the secret name (SPLIT_TOKEN) matches the action's
token input.
🧹 Nitpick comments (1)
.github/scripts/generate-split-matrix.php (1)

21-21: Comment doesn't match implementation.

The comment says → Sylius/{Name} but the repository field is set to just $name (e.g., Order not Sylius/Order). Similar mismatches exist on lines 37 and 53. Consider updating the comments to match the actual output format shown in the docblock.

GSadee

This comment was marked as resolved.

@GSadee GSadee merged commit 383e1f2 into Sylius:2.3 Jan 27, 2026
42 of 46 checks passed
@NoResponseMate NoResponseMate deleted the maintenance/split-action branch January 27, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI DX Issues and PRs aimed at improving Developer eXperience. Maintenance CI configurations, READMEs, releases, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants