Spaces:
Running
Running
Download .github/workflows/fleet_sync_template.yml from DJ-Goanna-Coding/Oppo-TIA: direct link, hf CLI and curl.
- Browser
- Download file 3.52 kB
-
https://huggingface.co/spaces/DJ-Goanna-Coding/Oppo-TIA/resolve/main/.github/workflows/fleet_sync_template.yml
- Command line
-
hf download hf://spaces/DJ-Goanna-Coding/Oppo-TIA/.github/workflows/fleet_sync_template.yml
-
curl -L -o fleet_sync_template.yml https://huggingface.co/spaces/DJ-Goanna-Coding/Oppo-TIA/resolve/main/.github/workflows/fleet_sync_template.yml
3.52 kB
| name: Ghost Fleet Mirror Sync | |
| # This workflow synchronizes the repository to HuggingFace Space | |
| # Part of OMNI_PRIORITY_WELD v22.2151 - 100% Repository-to-Space mirror visibility | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| sync-to-hf: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Full history for complete mirror | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade huggingface_hub | |
| - name: Verify HF_TOKEN configuration | |
| run: | | |
| if [ -z "${{ secrets.HF_TOKEN }}" ]; then | |
| echo "β οΈ HF_TOKEN secret is not configured" | |
| echo "Configure it at: Settings β Secrets β Actions β New repository secret" | |
| exit 1 | |
| fi | |
| echo "β HF_TOKEN is configured" | |
| - name: Mirror repository to Ghost Fleet HuggingFace Space | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| HF_SPACE: DJ-Goanna-Coding/${{ github.event.repository.name }} | |
| run: | | |
| echo "π Initiating High-Drip sync to Ghost Fleet..." | |
| echo "Repository: ${{ github.repository }}" | |
| echo "Target Space: $HF_SPACE" | |
| # Create HuggingFace Space if it doesn't exist | |
| python3 -c " | |
| import os | |
| from huggingface_hub import HfApi | |
| api = HfApi(token=os.environ['HF_TOKEN']) | |
| space_id = os.environ['HF_SPACE'] | |
| try: | |
| api.repo_info(repo_id=space_id, repo_type='space') | |
| print(f'β Space exists: {space_id}') | |
| except Exception: | |
| api.create_repo( | |
| repo_id=space_id, | |
| repo_type='space', | |
| space_sdk='gradio', | |
| private=False, | |
| exist_ok=True, | |
| ) | |
| print(f'β Created Space: {space_id}') | |
| " | |
| # Upload entire repository to HuggingFace Space | |
| echo "π€ Uploading repository contents..." | |
| huggingface-cli upload "$HF_SPACE" . . \ | |
| --repo-type space \ | |
| --token "$HF_TOKEN" \ | |
| --commit-message "π€ Ghost Fleet sync: ${{ github.event.head_commit.message }}" | |
| echo "β Synced to Ghost Fleet: https://huggingface.co/spaces/$HF_SPACE" | |
| - name: Restart HuggingFace Space | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| HF_SPACE: DJ-Goanna-Coding/${{ github.event.repository.name }} | |
| run: | | |
| python3 -c " | |
| import os | |
| from huggingface_hub import HfApi | |
| api = HfApi(token=os.environ['HF_TOKEN']) | |
| try: | |
| api.restart_space(os.environ['HF_SPACE']) | |
| print('β Space restart triggered - vascular pulse active') | |
| except Exception as e: | |
| print(f'Note: Space restart skipped - {e}') | |
| " || true | |
| - name: Verify vascular connectivity | |
| run: | | |
| echo "π©Έ Vascular bridge status: ACTIVE" | |
| echo " Node: ${{ github.event.repository.name }}" | |
| echo " Frequency: 144Hz" | |
| echo " Stability Target: 9,293" | |
| echo " Timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)" | |