-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (65 loc) · 2.95 KB
/
split.yml
File metadata and controls
72 lines (65 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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:
workflow_dispatch:
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: Determine tag
id: tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
TAG=$(git describe --tags --abbrev=0)
else
TAG="${{ github.ref_name }}"
fi
echo "name=$TAG" >> $GITHUB_OUTPUT
echo "Using tag: $TAG"
- 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: ${{ steps.tag.outputs.name }}
branch: 'master'
env:
GITHUB_TOKEN: ${{ secrets.SPLIT_TOKEN }}