-
Notifications
You must be signed in to change notification settings - Fork 119
71 lines (68 loc) · 2.25 KB
/
fanout.yml
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
name: "Fan out changes to distinct repositories"
on:
push:
branches:
- "main"
- "develop"
concurrency: fanout-${{ github.ref }}
jobs:
fanout:
strategy:
matrix:
parts:
- dir: "addons/escoria-core"
repo: "godot-escoria/escoria-core"
- dir: "addons/escoria-ui-simplemouse"
repo: "godot-escoria/escoria-ui-simplemouse"
- dir: "addons/escoria-ui-9verbs"
repo: "godot-escoria/escoria-ui-9verbs"
- dir: "addons/escoria-core"
repo: "godot-escoria/escoria-game-template"
- dir: "addons/escoria-dialog-simple"
repo: "godot-escoria/escoria-dialog-simple"
name: "Fanout ${{ matrix.parts.dir }} to ${{ matrix.parts.repo }}"
runs-on: "ubuntu-20.04"
env:
DIR: "${{matrix.parts.dir}}"
REPO: "${{matrix.parts.repo}}"
steps:
- name: "Configure git"
run: |
if ! git --version | grep 2.33 >/dev/null
then
sudo add-apt-repository ppa:git-core/ppa -y
sudo apt-get update
sudo apt-get install git -y
fi
- name: "Checkout"
uses: "actions/checkout@v3"
with:
repository: "godot-escoria/escoria-demo-game"
ref: "develop"
path: "demo-game"
token: "${{ secrets.ESCORIA_DEPLOYMENT_TOKEN }}"
fetch-depth: 0
- name: "Filtering out ${{ env.DIR }}"
run: |
curl -s https://raw.githubusercontent.com/newren/git-filter-repo/main/git-filter-repo -o git-filter-repo
chmod +x git-filter-repo
cd demo-game
git remote -v
../git-filter-repo --path $DIR --prune-empty auto --force
git clean -fd
git status
- name: "Checkout"
uses: "actions/checkout@v3"
with:
repository: "${{ env.REPO }}"
ref: "develop"
path: "target"
token: "${{ secrets.ESCORIA_DEPLOYMENT_TOKEN }}"
fetch-depth: 0
- name: "Apply changes"
run: |
cd target
git config --global user.email "[email protected]"
git config --global user.name "Escoria merge bot"
git pull ../demo-game develop --rebase
git push --force