Sync Submodules #737
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
on: | |
schedule: | |
# Run everyday at 11:00 UTC | |
- cron: '0 11 * * *' | |
# Allows you to run this workflow manually from the Actions tab or through HTTP API | |
workflow_dispatch: | |
name: Sync Submodules | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Git submodule update | |
run: | | |
git submodule update --init --recursive --remote | |
- 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 "submodules: Updated references" && git push || echo "No changes to commit" |