Files
altstack-data/.github/workflows/sync-to-main-app.yml
2026-04-11 22:09:45 +05:30

51 lines
1.5 KiB
YAML

name: '🔄 Sentinel: Sync to thealtstack'
on:
push:
branches:
- main
paths:
- 'data/**'
- 'docker-deploy/**'
workflow_dispatch: {}
jobs:
sync:
if: "!contains(github.event.head_commit.message, 'Sentinel: Synchronization from')"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: 📥 Checkout altstack-data (source)
uses: actions/checkout@v4
with:
path: source-repo
- name: 📥 Manual Checkout thealtstack (target)
run: |
git clone https://x-access-token:${{ secrets.GH_PAT }}@github.com/aa-humaaan/thealtstack.git target-repo
cd target-repo
git checkout main
- name: 🔄 Copy data and docker-deploy
run: |
mkdir -p target-repo/data target-repo/docker-deploy
rsync -av --delete source-repo/data/ target-repo/data/
rsync -av --delete source-repo/docker-deploy/ target-repo/docker-deploy/
- name: '📤 Sentinel: Push updates to thealtstack'
run: |
cd target-repo
git config user.name "Sovereign Sentinel (AI)"
git config user.email "sentinel@thealtstack.com"
git add data/ docker-deploy/
if git diff --staged --quiet; then
echo "💤 Sentinel: Dataset remains optimal. No sync required."
exit 0
fi
git commit -m "🤖 Sentinel: Synchronization from altstackHQ/altstack-data"
git push origin main