feat: Added fanout workflow
This commit is contained in:
57
.github/workflows/fanout.yml
vendored
Normal file
57
.github/workflows/fanout.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: "Fan out changes to distinict repositories"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
|
||||
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"
|
||||
name: "Fanout ${{ matrix.parts.dir }} to ${{ matrix.parts.repo }}"
|
||||
runs-on: "ubuntu-latest"
|
||||
env:
|
||||
DIR: "${{matrix.parts.dir}}"
|
||||
REPO: "${{matrix.parts.repo}}"
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v2"
|
||||
with:
|
||||
path: "demo-game"
|
||||
- name: "Filtering out ${{ env.DIR }}"
|
||||
run: |
|
||||
curl -s https://raw.githubusercontent.com/newren/git-filter-repo/main/git-filter-repo -o git-filter-repo
|
||||
cp -a git-filter-repo $(git --exec-path)
|
||||
chmod +x $(git --exec-path)/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@v2"
|
||||
with:
|
||||
repository: "${{ env.REPO }}"
|
||||
ref: "develop"
|
||||
path: "target"
|
||||
token: "${{ secrets.DEPLOYMENT_TOKEN }}"
|
||||
fetch-depth: 0
|
||||
- name: "Apply changes"
|
||||
run: |
|
||||
cd target
|
||||
git config --global user.email "contact@escoria-framework.org"
|
||||
git config --global user.name "Escoria merge bot"
|
||||
git pull ../demo-game develop --rebase
|
||||
git push --force
|
||||
Reference in New Issue
Block a user