Update submodules #19
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: Update submodules | |
# Controls when the action will run. | |
on: | |
schedule: | |
- cron: '30 5 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# This workflow contains a single job called "update" | |
update: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Pull & update submodules recursively | |
run: | | |
git submodule update --init --recursive | |
git submodule update --recursive --remote | |
- name: Commit | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "GitHub Actions - update submodules" | |
git add --all | |
git commit -m "Update submodules" || echo "No changes to commit" | |
# See https://github.com/orgs/community/discussions/25702 why this is necessary! | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.PAT }} |