Spaces:
Sleeping
Sleeping
| name: Global Hunter Cron | |
| on: | |
| schedule: | |
| # Runs at 06:00 AM UTC daily | |
| - cron: '0 6 * * *' | |
| workflow_dispatch: # Manual Button | |
| repository_dispatch: | |
| types: [catalyst-alert] | |
| jobs: | |
| global-hunt: | |
| runs-on: ubuntu-latest | |
| # ๐ CRITICAL UPDATE: Set this to 60 minutes | |
| timeout-minutes: 60 | |
| # ๐จ CRITICAL NEW STEP: Grant the bot permission to push files to the repo | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install alpaca-trade-api>=3.0 || echo "alpaca-trade-api install skipped" | |
| pip install "websockets>=13.0" --force-reinstall --quiet | |
| - name: Run The Marathon | |
| env: | |
| RESEND_API_KEY_CISCO: ${{ secrets.RESEND_API_KEY_CISCO }} | |
| EMAIL_CISCO: ${{ secrets.EMAIL_CISCO }} | |
| RESEND_API_KEY_RAUL: ${{ secrets.RESEND_API_KEY_RAUL }} | |
| EMAIL_RAUL: ${{ secrets.EMAIL_RAUL }} | |
| RESEND_API_KEY_DAVID: ${{ secrets.RESEND_API_KEY_DAVID }} | |
| EMAIL_DAVID: ${{ secrets.EMAIL_DAVID }} | |
| BRAVE_API_KEY: ${{ secrets.BRAVE_API_KEY }} | |
| OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} | |
| FINNHUB_API_KEY: ${{ secrets.FINNHUB_API_KEY }} | |
| LANGCHAIN_TRACING_V2: "true" | |
| LANGCHAIN_API_KEY: ${{ secrets.LANGCHAIN_API_KEY }} | |
| LANGCHAIN_PROJECT: primogreedy | |
| LANGSMITH_WORKSPACE_ID: ${{ secrets.LANGSMITH_WORKSPACE_ID }} | |
| VPS_API_URL: ${{ secrets.VPS_API_URL }} | |
| VPS_API_KEY: ${{ secrets.VPS_API_KEY }} | |
| ALPACA_API_KEY: ${{ secrets.ALPACA_API_KEY }} | |
| ALPACA_SECRET_KEY: ${{ secrets.ALPACA_SECRET_KEY }} | |
| ALPACA_ENABLED: ${{ secrets.ALPACA_ENABLED }} | |
| USE_DEBATE: ${{ secrets.USE_DEBATE }} | |
| PROMPT_VERSION: ${{ secrets.PROMPT_VERSION || 'latest' }} | |
| CATALYST_TICKER: ${{ github.event.client_payload.ticker || '' }} | |
| run: PYTHONPATH=. python src/whale_hunter.py | |
| # ๐จ CRITICAL NEW STEP: Save the memory file safely without crashing | |
| - name: Commit Exclusion Memory | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| # Create an empty JSON file if the Scout didn't find anything, preventing Git crashes | |
| if [ ! -f seen_tickers.json ]; then echo "{}" > seen_tickers.json; fi | |
| git add -f seen_tickers.json | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -m "๐ง Update Agent Memory Ledger" | |
| git fetch origin main | |
| git rebase origin/main | |
| git push origin HEAD:main | |
| fi |