2021-02-18 20:05:43 -07:00
|
|
|
name: Update submodules
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 7 * * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
branch:
|
|
|
|
description: DFHack branch to update
|
|
|
|
required: false
|
|
|
|
default: develop
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
run:
|
2021-03-29 18:03:50 -06:00
|
|
|
if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'DFHack' }}
|
2021-02-18 20:05:43 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Clone DFHack
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: ${{ github.event.inputs.branch }}
|
|
|
|
submodules: true
|
2021-02-19 21:45:51 -07:00
|
|
|
token: ${{ secrets.DFHACK_GITHUB_TOKEN }}
|
2021-02-18 20:05:43 -07:00
|
|
|
- name: Update submodules
|
|
|
|
run: |
|
2021-02-18 20:14:05 -07:00
|
|
|
git config user.name "DFHack-Urist via GitHub Actions"
|
2021-02-22 22:29:28 -07:00
|
|
|
git config user.email "63161697+DFHack-Urist@users.noreply.github.com"
|
2021-02-18 20:05:43 -07:00
|
|
|
if bash -x ci/update-submodules.bash; then
|
2021-02-18 21:22:37 -07:00
|
|
|
git push --recurse-submodules=check
|
2021-02-18 20:05:43 -07:00
|
|
|
fi
|