submodule-update #176
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: submodule-update | |
on: | |
schedule: | |
- cron: '30 22 * * *' | |
workflow_dispatch: | |
jobs: | |
image: | |
name: submodule-update | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout Code" | |
uses: actions/[email protected] | |
with: | |
token: ${{ secrets.CI_TOKEN }} | |
submodules: 'recursive' | |
fetch-depth: 1 | |
# Update references | |
- name: Git Sumbodule Update | |
run: | | |
git pull --recurse-submodules | |
git submodule update --remote --recursive | |
# Commit and push | |
- name: Commit update | |
run: | | |
git config --global user.name 'Git bot' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git commit -am "Auto updated submodule references" && git push || echo "No changes to commit" |