-
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 972 Bytes
/
submodule-update.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
name: submodule-update
on:
schedule:
- cron: '0 */8 * * *'
workflow_dispatch:
jobs:
image:
name: submodule-update
runs-on: ubuntu-latest
steps:
- name: "Checkout Code"
uses: actions/checkout@v4
with:
token: ${{ secrets.CI_TOKEN }}
repository: ${{ github.repository }}
submodules: 'recursive'
fetch-depth: 1
# Update references
- name: Git Sumbodule Update
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
# Commit and push
- name: Commit update
run: |
git config --global user.name 'Bensuperpc'
git config --global user.email 'bensuperpc@gmail.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "Auto updated submodule references" && git push || echo "No changes to commit"