Skip to content

update

update #258

# 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