update #248
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
# From: https://tommoa.me/blog/github-auto-update-submodules/ | |
name: Update submodule | |
on: | |
repository_dispatch: | |
types: update | |
jobs: | |
udpate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.client_payload.ref }} | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
submodules: recursive | |
- name: Update module | |
run: | | |
git submodule update --init --recursive --checkout -f --remote -- "${{github.event.client_payload.module}}" | |
git config --global user.name "GitHub Action" | |
git config --global user.email "[email protected]" | |
git commit -am "deploy: ${{github.event.client_payload.module}} - ${{github.event.client_payload.sha}}" | |
git push |