Skip to content

update_submodules

update_submodules #10

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"