update-submodule #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync Submodule | |
on: | |
# This workflow is triggered every time the docs is changed in sycamore-rs/sycamore | |
repository_dispatch: | |
types: [update-submodule] | |
workflow_dispatch: | |
jobs: | |
sync: | |
name: Sync Submodule | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
token: ${{ secrets.CI_TOKEN }} | |
- name: update submodule git references | |
run: | | |
git pull --recurse-submodules | |
git submodule update --remote --recursive | |
- name: commit update | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git remote set-url origin https://x-access-token:${{ secrets.CI_TOKEN }}@github.com/${{ github.repository }} | |
git commit -am "Auto updated submodule references" && git push || echo "No changes to commit" |