-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1.04 KB
/
update-submodules.yml
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
35
36
37
38
name: Update Submodules
on:
workflow_dispatch:
schedule:
- cron: '0 19 * * *'
jobs:
uptdate:
name: 'Update Submodules'
runs-on: ubuntu-latest
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
defaults:
run:
shell: bash
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
submodules: true
# Update references
- name: Git Submodule Update
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
- name: Commit Update
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }}
git commit -am "chore: update submodules" && git push || echo "No changes to commit"