From 2ad5377476a6068ac36c544cf17782225f44f229 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 16 Jan 2026 07:34:53 -0600 Subject: [PATCH] Split workflow --- .github/workflows/split.yml | 60 +++++++++++++++++++++++++++++++++++++ .gitignore | 1 + .phpunit.cache/test-results | 1 - 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/split.yml delete mode 100644 .phpunit.cache/test-results diff --git a/.github/workflows/split.yml b/.github/workflows/split.yml new file mode 100644 index 0000000..9b9ac2e --- /dev/null +++ b/.github/workflows/split.yml @@ -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 }} diff --git a/.gitignore b/.gitignore index bdd21c4..d85e542 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ composer.lock vendor .idea .vscode +.phpunit.cache/ .phpunit.result.cache phpunit.xml .ecs_cache diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results deleted file mode 100644 index 60d868d..0000000 --- a/.phpunit.cache/test-results +++ /dev/null @@ -1 +0,0 @@ -{"version":2,"defects":[],"times":{"Secretary\\Tests\\ManagerTest::testConstruct":0.017,"Secretary\\Tests\\ManagerTest::testGetSecret":0.003,"Secretary\\Tests\\ManagerTest::testGetBadSecret":0.007,"Secretary\\Tests\\ManagerTest::testPutSecret":0,"Secretary\\Tests\\ManagerTest::testDeleteSecretByKey":0.001,"Secretary\\Tests\\ManagerTest::testDeleteSecret":0,"Secretary\\Tests\\ManagerTest::testGetAdapter":0}} \ No newline at end of file