-
-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (28 loc) · 909 Bytes
/
sub-module.yml
File metadata and controls
36 lines (28 loc) · 909 Bytes
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
on:
workflow_dispatch:
name: Sync Submodule
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
sync-submodule:
name: Sync Submodule
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Pull all submodule
run: git submodule update --init --recursive
- name: Setup Git
run: |
git config user.name '${{secrets.MAINTAINER_NAME}}'
git config user.email '${{secrets.MAINTAINER_EMAIL}}'
- name: Create new branch
run: git checkout -b submodule-sync-${{ github.sha }}
- name: Sync submodule
run: |
git submodule update --remote --merge
- name: Create branch
run: |
git add .
git commit -m "Sync submodules - Updated submodules" || echo "No changes to commit"
git push origin submodule-sync-${{ github.sha }}