Skip to content

Commit 42e5f8f

Browse files
Open a PR updating the submodule in the main repo
1 parent 8324634 commit 42e5f8f

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/sync-fork.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,42 @@ jobs:
2222
auto_approve: false
2323
auto_merge: true
2424
token: ${{ secrets.GITHUB_TOKEN }}
25+
26+
open_pr:
27+
name: Update submodule after syncing
28+
runs-on: ubuntu-20.04
29+
needs:
30+
- sync
31+
32+
steps:
33+
- name: Configure git
34+
run: |
35+
git config --global pull.rebase false
36+
git config --global user.email [email protected]
37+
git config --global user.name "Kitspace Auto-Merge Bot"
38+
- name: Check out gitea repo
39+
uses: actions/checkout@v2
40+
- name: Get gitea SHA
41+
id: sha
42+
shell: bash
43+
run: |
44+
echo "::set-output name=gitea_sha_short::$(git log --format=%h -n1)"
45+
- name: Check out kitspace repo
46+
uses: actions/checkout@v2
47+
with:
48+
repository: kitspace/kitspace-v2
49+
- name: Update submodule
50+
run: |
51+
git submodule update --init
52+
cd gitea
53+
git checkout ${{ steps.sha.outputs.gitea_sha_short }}
54+
cd ..
55+
git commit -am "Deps: update gite@${{ steps.sha.outputs.gitea_sha_short }}"
56+
- name: Open PR
57+
uses: peter-evans/create-pull-request@v3
58+
with:
59+
delete-branch: true
60+
reviewers: kasbah,AbdulrhmnGhanem
61+
title: Auto update gitea
62+
labels: dependencies
63+
token: ${{ secrets.PAT }}

0 commit comments

Comments
 (0)