forked from DFHack/dfhack
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 987 Bytes
/
update-submodules.yml
File metadata and controls
34 lines (32 loc) · 987 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
name: Update submodules
on:
schedule:
- cron: '0 7 * * *'
workflow_dispatch:
inputs:
branch:
description: DFHack branch to update
required: false
default: develop
jobs:
run:
if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'DFHack' }}
runs-on: ubuntu-latest
steps:
- name: Clone DFHack
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
submodules: true
token: ${{ secrets.DFHACK_GITHUB_TOKEN }}
- name: Update submodules
run: |
git config user.name "DFHack-Urist via GitHub Actions"
git config user.email "63161697+DFHack-Urist@users.noreply.github.com"
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