Update submodules (nightly) #742
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 (nightly) | |
on: | |
# Schedule updates | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
github-metrics: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
token: ${{ secrets.PRIVATE_TOKEN_GITHUB_KERRYEON }} | |
- name: Update submodules recursively | |
run: | | |
git submodule update --init --recursive | |
git submodule foreach --recursive git checkout master | |
- name: Commit update | |
run: | | |
git config user.name "GitHub Actions - Update submodules" | |
git config user.email "[email protected]" | |
git add --all | |
git commit -m "Update submodules" || echo "No changes to commit" | |
git push |