-
Notifications
You must be signed in to change notification settings - Fork 130
32 lines (27 loc) · 933 Bytes
/
sync-submodules.yml
File metadata and controls
32 lines (27 loc) · 933 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
on:
schedule:
# Run at 11:11 (UTC) every Monday
- cron: '11 11 * * 1'
# Allow running manually, from the Actions tab or through the GitHub HTTP API
workflow_dispatch:
name: Sync Submodules
jobs:
sync:
runs-on: ubuntu-latest
if: github.repository == 'bluerobotics/BlueOS'
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Git submodule update
run: |
git submodule update --init --recursive --remote
- name: Commit update
run: |
git config --global user.name 'Git bot'
git config --global user.email 'bot@noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "submodules: Updated references" && git push || echo "No changes to commit"