Skip to content

Update Submodule

Update Submodule #4665

Workflow file for this run

name: Update Submodule
on:
schedule:
- cron: '*/15 * * * *'
jobs:
update-submodule:
runs-on: ubuntu-latest
steps:
- name: Check Out Repository
uses: actions/checkout@v2
- name: Update Submodules
id: submodule_changes
run: |
git submodule update --remote
if [[ -n $(git status --porcelain) ]]; then
echo "Submodule changes detected."
echo "::set-output name=changes::true"
else
echo "No submodule changes detected."
echo "::set-output name=changes::false"
fi
- name: Commit and Push Changes
if: steps.submodule_changes.outputs.changes == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "Spectrum Labs Bot"
git config user.email "[email protected]"
git add .
git commit -m "Cron: Update Submodule"
git push --set-upstream origin $GITHUB_REF