Skip to content

Update Submodules

Update Submodules #995

name: Update Submodules
on:
workflow_dispatch:
inputs:
repository:
description: 'Repository that triggered the update'
required: true
ref:
description: 'The branch or tag that was pushed'
required: true
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.RUBROT_PAT }}
submodules: recursive
- name: Git config
run: |
git config user.name rubrot
git config user.email ros@rubriclabs.com
- name: Update submodules
run: |
git submodule update --remote
git diff --exit-code || {
git add .
git commit -m "Update submodules (triggered by ${{ github.event.inputs.repository }})"
git push
}