Skip to content

Update submodules #1754

Update submodules

Update submodules #1754

name: Update submodules
on:
schedule:
- cron: '0 7 * * *'
workflow_dispatch:
jobs:
run:
if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'DFHack' }}
runs-on: ubuntu-latest
steps:
- name: Clone DFHack
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
submodules: true
token: ${{ secrets.DFHACK_GITHUB_TOKEN }}
- name: Update submodules
run: |
git config user.name "DFHack-Urist via GitHub Actions"
git config user.email "[email protected]"
if bash -x ci/update-submodules.bash; then
git push --recurse-submodules=check
elif ! git diff --exit-code HEAD; then
echo "update-submodules.bash failed to commit changes"
exit 1
fi