-
Notifications
You must be signed in to change notification settings - Fork 38
38 lines (32 loc) · 1.28 KB
/
submodule_updater.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
name: Update Submodules
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: tgstation/map_depot
token: ${{ secrets.WRITE_SECRET }}
- name: Pull & update submodules recursively
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Commit
run: |
git config user.email "[email protected]"
git config user.name "Submodule Updater"
git add --all
git commit -m "Submodule Update - Discard Any Changes" || echo "No Changes To Commit"
git push
# The reason why we say "Discard Any Changes" is because sometimes, when you merge master in your branch,
# Git may assume that you want to change the submodule commit from whatever is on your machine
# to the one that we have on master. So, this is a helpful reminder to all those who contribute
# that they should discard any changes to this file before they commit. Also, discarding this change
# does mean that you will actually be on the most recent commit in the tgstation submodule.
# If you do not discard your change, your submodule will not be in-date.
#
# -san7890