Skip to content

PredictX Submodule Auto-Sync #47

PredictX Submodule Auto-Sync

PredictX Submodule Auto-Sync #47

Workflow file for this run

name: PredictX Submodule Auto-Sync
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-submodules:
# We keep this as ubuntu-latest because it is GitHub's fastest environment.
# It works perfectly even if you develop on a Mac.
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout PredictX
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Config Git User
run: |
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
- name: Update All Submodules
run: |
# This command tells the cloud computer to check the 5 original repos
git submodule update --init --recursive
git submodule update --remote --merge
- name: Check for changes and Push
run: |
git add .
if [ -n "$(git status --porcelain)" ]; then
git commit -m "Auto-update: Synced all bot submodules to latest versions"
git push origin HEAD
else
echo "No updates found. Everything is already up to date."
fi