Update Submodule #14237
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 Submodule | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "10,40 * * * *" | |
jobs: | |
update-submodule: | |
name: Update Submodule | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
submodules: true | |
- name: Git submodule update | |
run: | | |
git pull --rebase=true --recurse-submodules | |
git submodule update --remote --recursive | |
- name: Commit update | |
run: | | |
git config --global user.name 'GitHub Action' | |
git config --global user.email '[email protected]' | |
if git commit -am "ci: update TLDR submodule" && git push; then | |
exit 0 | |
else | |
exit 1 | |
fi | |
- name: Trigger Calculate Metrics | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
github.rest.actions.createWorkflowDispatch({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
workflow_id: 'calculate-metrics.yml', | |
ref: 'main', | |
}) |