Update submodules #1120
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 | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
outputs: | |
success: ${{ steps.commit.outputs.outcome == 'success' }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: false | |
lfs: true | |
- name: Update submodules | |
run: git submodule update --init --remote --force | |
- name: Commit update | |
id: commit | |
continue-on-error: true | |
run: | | |
git config --local user.name "precice-bot" | |
git config --local user.email "[email protected]" | |
git commit -m "Update submodules" -a | |
- name: Push commit | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.WORKFLOW_DISPATCH_TOKEN }} | |
branch: ${{ github.ref }} | |
deploy: | |
needs: update | |
if: ${{ needs.update.outputs.success }} | |
uses: ./.github/workflows/deploy.yml | |
secrets: inherit |