Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/split.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Split Monorepo

# Split monorepo packages to their respective read-only repositories
# Triggered after semantic-release creates a new tag
#
# REQUIRED SECRET:
# SPLIT_TOKEN - A Personal Access Token (classic) with `repo` scope
# that has write access to all secretary/* sub-repositories.
# The default GITHUB_TOKEN cannot push to other repositories.

on:
push:
tags:
- '*'

jobs:
split:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
package:
- local_path: 'src/Core'
split_repository: 'php-core'
- local_path: 'src/Adapter/AWS/SecretsManager'
split_repository: 'php-aws-secrets-manager-adapter'
- local_path: 'src/Adapter/GCP/SecretsManager'
split_repository: 'php-gcp-secrets-manager-adapter'
- local_path: 'src/Adapter/Hashicorp/Vault'
split_repository: 'php-hashicorp-vault-adapter'
- local_path: 'src/Adapter/Local/JSONFile'
split_repository: 'php-json-file-adapter'
- local_path: 'src/Adapter/Cache/PSR6Cache'
split_repository: 'php-psr6-cache-adapter'
- local_path: 'src/Adapter/Cache/PSR16Cache'
split_repository: 'php-psr16-cache-adapter'
- local_path: 'src/Adapter/Chain'
split_repository: 'php-chain-adapter'
- local_path: 'src/Bundle/SecretaryBundle'
split_repository: 'php-secretary-bundle'

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Split ${{ matrix.package.split_repository }}
uses: symplify/monorepo-split-github-action@v2.3.0
with:
package_directory: ${{ matrix.package.local_path }}
repository_organization: 'secretary'
repository_name: ${{ matrix.package.split_repository }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
tag: ${{ github.ref_name }}
branch: 'master'
env:
GITHUB_TOKEN: ${{ secrets.SPLIT_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ composer.lock
vendor
.idea
.vscode
.phpunit.cache/
.phpunit.result.cache
phpunit.xml
.ecs_cache
1 change: 0 additions & 1 deletion .phpunit.cache/test-results

This file was deleted.