All Projects → symplify → monorepo-split-github-action

symplify / monorepo-split-github-action

Licence: other
Github Action for Monorepo Split

Programming Languages

PHP
23972 projects - #3 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to monorepo-split-github-action

Lite
Split a repository to read-only standalone repositories
Stars: ✭ 1,229 (+2094.64%)
Mutual labels:  split, monorepo
create-contentful-app
Bootstrap a Contentful App
Stars: ✭ 68 (+21.43%)
Mutual labels:  monorepo
routing
Aplus Framework Routing Library
Stars: ✭ 186 (+232.14%)
Mutual labels:  gitlab
mmd-gitlab-backuper
a package to backup from all projects that you have on gitlab
Stars: ✭ 27 (-51.79%)
Mutual labels:  gitlab
repobee
CLI tool for managing Git repositories on GitHub and GitLab in the context of education
Stars: ✭ 51 (-8.93%)
Mutual labels:  gitlab
gitlab-ci-runner-marathon
A customized Docker image for running scalable GitLab CI runners on Marathon
Stars: ✭ 14 (-75%)
Mutual labels:  gitlab
ts
⚙️ The CLI that TypeScript deserves.
Stars: ✭ 17 (-69.64%)
Mutual labels:  monorepo
integration gitlab
🦊 GitLab integration into Nextcloud
Stars: ✭ 31 (-44.64%)
Mutual labels:  gitlab
merge-request-notifier
This app shows your merge requests grouped by projects and WIP status. It is accessible from the system tray.
Stars: ✭ 47 (-16.07%)
Mutual labels:  gitlab
MeetU
Application that build on Elasticsearch and Spring Boot Microservices (Synchronous Service)
Stars: ✭ 22 (-60.71%)
Mutual labels:  monorepo
typescript-monorepo-cra-example
TypeScript@3 monorepo example CRA version
Stars: ✭ 25 (-55.36%)
Mutual labels:  monorepo
ruby-client
Ruby SDK client for Split Software
Stars: ✭ 22 (-60.71%)
Mutual labels:  split
ctx-core
A composable monorepo web-service/front-end toolkit
Stars: ✭ 25 (-55.36%)
Mutual labels:  monorepo
AEScript-Explode-Shape-Layer
Extract shapes from a shape layer to individual layers
Stars: ✭ 37 (-33.93%)
Mutual labels:  split
caesar
持续集成
Stars: ✭ 40 (-28.57%)
Mutual labels:  gitlab
pagination
Aplus Framework Pagination Library
Stars: ✭ 167 (+198.21%)
Mutual labels:  gitlab
Containerization-Automation
Study and Use of Containers and Automation Tools
Stars: ✭ 45 (-19.64%)
Mutual labels:  gitlab
jscrambler
Monorepo of Jscrambler's Javascript Client and Integrations
Stars: ✭ 118 (+110.71%)
Mutual labels:  monorepo
affresco
🖼 KSF Media frontend monorepo
Stars: ✭ 30 (-46.43%)
Mutual labels:  monorepo
blog
blog posts & source code.
Stars: ✭ 44 (-21.43%)
Mutual labels:  monorepo

GitHub Action for Monorepo Split

Version 2.0 now supports split to GitHub and Gitlab private repositories!


Do you have a monorepo 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.

How does the Split Result Look Like?

This repository splits tests into symplify/monorepo-split-github-action-test repository.

Not on every commit, but only if contents of /tests/packages/some-package directory changes. Try it yourself - send PR with change in that directory.


Docs

Config

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

env:
    GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
    # or
    GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}

Make sure to add this access token in "Secrets" of package settings: https://github.com/<organization>/<package>/settings/secrets/actions


Define your GitHub Workflow

name: 'Packages Split'

on:
    push:
        branches:
            - main
        tags:
            - '*'

env:
    # 1. for Github split
    GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

    # 2. for Gitlab split
    GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}

jobs:
    packages_split:
        runs-on: ubuntu-latest

        strategy:
            fail-fast: false
            matrix:
                # define package to repository map
                package:
                    -
                        local_path: 'easy-coding-standard'
                        split_repository: 'easy-coding-standard'

        steps:
            -   uses: actions/checkout@v2

            # no tag
            -
                if: "!startsWith(github.ref, 'refs/tags/')"
                uses: "symplify/[email protected]"
                with:
                    # ↓ split "packages/easy-coding-standard" directory
                    package_directory: 'packages/${{ matrix.package.local_path }}'

                    # ↓ into https://github.com/symplify/easy-coding-standard repository
                    repository_organization: 'symplify'
                    repository_name: '${{ matrix.package.split_repository }}'

                    # [optional, with "github.com" as default]
                    repository_host: git.private.com:1234

                    # ↓ the user signed under the split commit
                    user_name: "kaizen-ci"
                    user_email: "[email protected]"

            # with tag
            -
                if: "startsWith(github.ref, 'refs/tags/')"
                uses: "symplify/[email protected]"
                with:
                    tag: ${GITHUB_REF#refs/tags/}

                    # ↓ split "packages/easy-coding-standard" directory
                    package_directory: 'packages/${{ matrix.package.local_path }}'

                    # ↓ into https://github.com/symplify/easy-coding-standard repository
                    repository_organization: 'symplify'
                    repository_name: '${{ matrix.package.split_repository }}'

                    # [optional, with "github.com" as default]
                    repository_host: git.private.com:1234

                    # ↓ the user signed under the split commit
                    user_name: "kaizen-ci"
                    user_email: "[email protected]"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].