Skip to content

update_submodule

update_submodule #58

name: Update Submodules
permissions:
contents: write
on:
repository_dispatch:
types: [update_submodule]
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout meta repo at main
uses: actions/checkout@v3
with:
ref: latest
token: ${{ secrets.GITHUB_TOKEN }}
submodules: false # Avoid broken recursive update
fetch-depth: 0
# persist-credentials: false
- name: Sync and update submodules
run: |
git submodule sync
git submodule update --init --remote
- name: Commit submodule changes
run: |
git add .
git config user.name "GitHub Action"
git config user.email "action@github.com"
git diff --cached --quiet || git commit -m "Update submodules from ${{ github.event.client_payload.repo }}"
git push