Update products #11
This file contains hidden or 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 products | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| update-submodules: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repository with submodules | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| token: ${{ secrets.SYNTHETIC_DATA_REPO_PAT }} | |
| - name: Update submodules to latest configured branches | |
| run: | | |
| git submodule foreach ' | |
| branch=$(git config -f $toplevel/.gitmodules submodule.$name.branch || echo HEAD) | |
| path=$(git config -f $toplevel/.gitmodules submodule.$name.path || echo HEAD) | |
| git -C $path config remote.origin.fetch +refs/heads/*:refs/remotes/origin/$branch | |
| ' | |
| git submodule update --remote | |
| - name: Restore push credentials | |
| run: | | |
| git remote set-url origin https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git | |
| - name: Commit changes | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| default_author: github_actions | |
| message: Update submodules | |
| fetch: false |