Skip to content

Sync Submodules

Sync Submodules #53

name: Sync Submodules
on:
workflow_dispatch:
jobs:
sync:
name: Sync Submodules
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{secrets.ADMIN_TOKEN}}
submodules: true
- name: Git Submodule Update
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
- name: Commit update
run: |
git config --global user.name "@alerceadmin"
git config --global user.email "[email protected]"
git remote set-url origin https://x-access-token:${{ secrets.ADMIN_TOKEN }}@github.com/${{ github.repository }}
git commit -am "Auto updated submodule references" && git push || echo "No changes to commit"