-
Notifications
You must be signed in to change notification settings - Fork 42
52 lines (42 loc) · 1.4 KB
/
update-submodules.yml
File metadata and controls
52 lines (42 loc) · 1.4 KB
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
name: Update Submodules
on:
workflow_dispatch:
repository_dispatch:
types: [version-push]
concurrency:
group: ${{github.workflow}}
cancel-in-progress: true
jobs:
update-submodule:
name: Update Submodules
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
steps:
- name: Print Dispatch Info
run: |
echo "Actor: ${{github.event.client_payload.actor}}"
echo "Head Ref: ${{github.event.client_payload.head_ref}}"
echo "Head Sha: ${{github.event.client_payload.head_sha}}"
echo "Base Ref: ${{github.event.client_payload.base_ref}}"
- name: Checkout Main
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
submodules: recursive
- name: Update Submodules
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Commit Changes
id: commit
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add --all
git commit -m "Update submodules" --author="${{github.event.client_payload.actor}} <${{github.event.client_payload.actor}}@users.noreply.github.com>" || :
- name: Push Changes
run: |
git push