Skip to content

version-push

version-push #94

name: Update Submodules
on:
workflow_dispatch:
repository_dispatch:
types: [version-push]
concurrency:
group: ${{github.workflow}}
cancel-in-progress: true
jobs:
update-submodule:
name: Update Submodules
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
steps:
- name: Print Dispatch Info
run: |
echo "Actor: ${{github.event.client_payload.actor}}"
echo "Head Ref: ${{github.event.client_payload.head_ref}}"
echo "Head Sha: ${{github.event.client_payload.head_sha}}"
echo "Base Ref: ${{github.event.client_payload.base_ref}}"
- name: Checkout Main
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
submodules: recursive
- name: Update Submodules
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Commit Changes
id: commit
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add --all
git commit -m "Update submodules" --author="${{github.event.client_payload.actor}} <${{github.event.client_payload.actor}}@users.noreply.github.com>" || :
- name: Push Changes
run: |
git push