Update Submodules #3018
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |