-
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.14 KB
/
update_submodules.yaml
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
name: Update submodules
on:
workflow_dispatch:
repository_dispatch:
types: [update_submodules]
jobs:
update_submodules:
# runs-on: ubuntu-latest
runs-on: arc-runner-k8s
permissions:
contents: write
pull-requests: write
steps:
- name: Force update git
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install -y git
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: true
- name: Git Sumbodule Update
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
- name: Commit update
run: |
git config --global user.name 'Bot'
git config --global user.email '[email protected]'
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"