-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (60 loc) · 2.04 KB
/
monorepo-split.yaml
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: Packages Split
on:
push:
branches:
- main
tags:
- '*'
paths:
- .github/workflows/monorepo-split.yaml
- composer/**
- npm/**
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
jobs:
packages_split:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Define package to repository map
package:
# Composer
- local_path: composer/packages/web-toolkit-bundle
split_repository: web-toolkit-bundle
- local_path: composer/packages/web-toolkit-k8s-cli
split_repository: web-toolkit-k8s-cli
- local_path: composer/projects/symfony-web-toolkit-skeleton
split_repository: symfony-web-toolkit-skeleton
- local_path: composer/projects/web-toolkit-k8s-cli-project
split_repository: web-toolkit-k8s-cli-project
# NPM
- local_path: npm/web-toolkit-front-end
split_repository: web-toolkit-front-end
# GitHub
- local_path: github/web-toolkit-workflows
split_repository: web-toolkit-workflows
steps:
- name: Checkout
uses: actions/checkout@v2
# No tag
- name: Run for no-tag
if: '!startsWith(github.ref, ''refs/tags/'')'
uses: danharrin/[email protected]
with:
package_directory: ${{ matrix.package.local_path }}
repository_organization: 'mep-agency'
repository_name: ${{ matrix.package.split_repository }}
user_name: GitHub Action
user_email: [email protected]
# With tag
- name: Run for tag
if: startsWith(github.ref, 'refs/tags/')
uses: danharrin/[email protected]
with:
tag: ${GITHUB_REF#refs/tags/}
package_directory: ${{ matrix.package.local_path }}
repository_organization: 'mep-agency'
repository_name: ${{ matrix.package.split_repository }}
user_name: GitHub Action
user_email: [email protected]