name: Update examples on: push: branches: - "main" concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: publish: if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest steps: - name: Checkout hexops/mach-examples repo uses: actions/checkout@v2 with: repository: hexops/mach-examples token: ${{ secrets.HEXOPS_MACH_PUSH_SUBREPOS }} submodules: 'true' - name: 'mach-examples: update mach submodule' run: | cd libs/mach git checkout origin/main cd ../../ - name: 'mach-examples: push submodule update' run: | git config user.name 'Release automation' git config user.email 'stephen@hexops.com' git add . git commit -m 'libs: mach: update to latest main revision' git push -u origin HEAD