-
Notifications
You must be signed in to change notification settings - Fork 86
54 lines (45 loc) · 1.51 KB
/
all-in-one.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
name: vsf all in one
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Checkout with submodule
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
submodules: true # ignore evm submodules
- name: Deinit all submodule
run: |
submodules=$(git submodule | cut --delimiter ' ' --fields 3)
for sub in $submodules; do
mv "$sub" tmp && rm tmp/.git
git submodule deinit "$sub" && git rm "$sub"
mv tmp "$sub" && git add "$sub"
done
- name: Commit changes
run: |
git lfs uninstall
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
last_sha1=$(git rev-parse HEAD)
git commit -am "deinit all submodule for $last_sha1"
- name: Fetch upstream
run: |
git remote add aio_repo https://github.com/${{ github.repository_owner }}/vsf-all-in-one.git
git fetch aio_repo
- name: Merge
run: |
git remote -v
git branch -v
git merge --strategy=ours --allow-unrelated-histories aio_repo/master
- name: Push
uses: ad-m/github-push-action@master
with:
repository: ${{ github.repository_owner }}/vsf-all-in-one
github_token: ${{ secrets.VSF_AIO }}
branch: master