Update submodules #1183
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: | |
# Run every day | |
- cron: '0 3 * * *' | |
jobs: | |
submodule: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone project | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Update submodules | |
run: | | |
set -ex | |
git submodule update --remote | |
- name: Commit/push if changed | |
run: | | |
set -ex | |
git config user.name 'github-actions[bot]' | |
git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git diff --quiet --exit-code && exit | |
git commit -a -m 'Update submodules' | |
git push | |
workflow-keepalive: | |
if: github.event_name == 'schedule' | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
steps: | |
- uses: liskin/gh-workflow-keepalive@v1 |