{"id":14986052,"url":"https://github.com/danharrin/monorepo-split-github-action","last_synced_at":"2025-05-07T15:22:57.858Z","repository":{"id":38241858,"uuid":"312807505","full_name":"danharrin/monorepo-split-github-action","owner":"danharrin","description":"Github Action for Monorepo Split","archived":false,"fork":false,"pushed_at":"2024-07-17T14:18:25.000Z","size":133,"stargazers_count":106,"open_issues_count":18,"forks_count":36,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-25T14:07:30.536Z","etag":null,"topics":["github-actions","monorepo","split"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danharrin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-14T11:56:22.000Z","updated_at":"2025-02-25T13:53:27.000Z","dependencies_parsed_at":"2024-06-18T15:13:38.336Z","dependency_job_id":"db0a5063-b059-4ce8-8e00-f44d032b5d04","html_url":"https://github.com/danharrin/monorepo-split-github-action","commit_stats":{"total_commits":285,"total_committers":11,"mean_commits":25.90909090909091,"dds":"0.11228070175438598","last_synced_commit":"ac9845270ef47266435b4f124b133a323619e738"},"previous_names":["symplify/monorepo-split-github-action"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danharrin%2Fmonorepo-split-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danharrin%2Fmonorepo-split-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danharrin%2Fmonorepo-split-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danharrin%2Fmonorepo-split-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danharrin","download_url":"https://codeload.github.com/danharrin/monorepo-split-github-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252903051,"owners_count":21822363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","monorepo","split"],"created_at":"2024-09-24T14:12:12.171Z","updated_at":"2025-05-07T15:22:57.835Z","avatar_url":"https://github.com/danharrin.png","language":"PHP","readme":"# GitHub Action for Monorepo Split\n\n**Version 2.0 now supports split to GitHub and Gitlab private repositories!**\n\n\u003cbr\u003e\n\nDo you have [a monorepo](https://tomasvotruba.com/cluster/monorepo-from-zero-to-hero/) project on GitHub and need split packages to many repositories? Add this GitHub Action to your workflow and let it split your packages on every commit and tag.\n\n### How does the Split Result Look Like?\n\nThis repository splits tests into [symplify/monorepo-split-github-action-test](https://github.com/symplify/monorepo-split-github-action-test) repository.\n\nNot on every commit, but only if contents of `/tests/packages/some-package` directory changes.\nTry it yourself - send PR with change in [that directory](/tests/packages/some-package).\n\n\u003cbr\u003e\n\n## Docs\n\n- [How to Use on Gitlab](docs/how_to_use_on_gitlab.md)\n\n## Config\n\nSplit is basically git push or local directory to remote git repository. This remote repository can be located on GitHub or Gitlab. To be able to do that, it needs `GITHUB_TOKEN` or `GITLAB_TOKEN` with write repository access:\n\n```yaml\nenv:\n    GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}\n    # or\n    GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}\n```\n\nMake sure to add this access token in \"Secrets\" of package settings at https://github.com/\u003corganization\u003e/\u003cpackage\u003e/settings/environments\n\n\u003cbr\u003e\n\n## Define your GitHub Workflow\n\n```yaml\nname: 'Packages Split'\n\non:\n    push:\n        branches:\n            - main\n        tags:\n            - '*'\n\nenv:\n    # 1. for Github split\n    GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}\n\n    # 2. for Gitlab split\n    GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}\n\njobs:\n    packages_split:\n        runs-on: ubuntu-latest\n\n        strategy:\n            fail-fast: false\n            matrix:\n                # define package to repository map\n                package:\n                    -\n                        local_path: 'easy-coding-standard'\n                        split_repository: 'easy-coding-standard'\n\n        steps:\n            -   uses: actions/checkout@v2\n\n            # no tag\n            -\n                if: \"!startsWith(github.ref, 'refs/tags/')\"\n                uses: \"symplify/monorepo-split-github-action@2.1\"\n                with:\n                    # ↓ split \"packages/easy-coding-standard\" directory\n                    package_directory: 'packages/${{ matrix.package.local_path }}'\n\n                    # ↓ into https://github.com/symplify/easy-coding-standard repository\n                    repository_organization: 'symplify'\n                    repository_name: '${{ matrix.package.split_repository }}'\n\n                    # [optional, with \"github.com\" as default]\n                    repository_host: git.private.com:1234\n\n                    # ↓ the user signed under the split commit\n                    user_name: \"kaizen-ci\"\n                    user_email: \"info@kaizen-ci.org\"\n\n            # with tag\n            -\n                if: \"startsWith(github.ref, 'refs/tags/')\"\n                uses: \"symplify/monorepo-split-github-action@2.1\"\n                with:\n                    tag: ${GITHUB_REF#refs/tags/}\n\n                    # ↓ split \"packages/easy-coding-standard\" directory\n                    package_directory: 'packages/${{ matrix.package.local_path }}'\n\n                    # ↓ into https://github.com/symplify/easy-coding-standard repository\n                    repository_organization: 'symplify'\n                    repository_name: '${{ matrix.package.split_repository }}'\n\n                    # [optional, with \"github.com\" as default]\n                    repository_host: git.private.com:1234\n\n                    # ↓ the user signed under the split commit\n                    user_name: \"kaizen-ci\"\n                    user_email: \"info@kaizen-ci.org\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanharrin%2Fmonorepo-split-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanharrin%2Fmonorepo-split-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanharrin%2Fmonorepo-split-github-action/lists"}