馃 Sentinel: Synchronization from aa-humaaan/thealtstack #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: 馃摜 Checkout thealtstack (target) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: aa-humaaan/thealtstack | |
| token: ${{ secrets.GH_PAT }} | |
| path: target-repo | |
| - 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 "Sentinel (Aditya's 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 |