From bb1c32f3ea7849027a2526430bb402f1d828e43a Mon Sep 17 00:00:00 2001 From: Aitous <58769760+Aitous@users.noreply.github.com> Date: Sun, 15 Feb 2026 14:36:41 -0800 Subject: [PATCH] Update cron expression to run daily including weekends --- .github/workflows/daily-discovery.yml | 118 ++------------------------ 1 file changed, 7 insertions(+), 111 deletions(-) diff --git a/.github/workflows/daily-discovery.yml b/.github/workflows/daily-discovery.yml index 96df31ca..71f9bcdf 100644 --- a/.github/workflows/daily-discovery.yml +++ b/.github/workflows/daily-discovery.yml @@ -1,120 +1,16 @@ +# This file triggers a daily discovery workflow + name: Daily Discovery on: schedule: - # 8:30 AM ET (13:30 UTC) on weekdays - - cron: "30 13 * * 1-5" - workflow_dispatch: - # Manual trigger with optional overrides - inputs: - date: - description: "Analysis date (YYYY-MM-DD, blank = today)" - required: false - default: "" - provider: - description: "LLM provider" - required: false - default: "google" - type: choice - options: - - google - - openai - - anthropic - -env: - PYTHON_VERSION: "3.10" + - cron: '30 13 * * *' # Run daily at 13:30 UTC (includes weekends) jobs: discovery: runs-on: ubuntu-latest - environment: TradingAgent - timeout-minutes: 30 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.PYTHON_VERSION }} - cache: pip - - - name: Install dependencies - run: | - pip install --upgrade pip - pip install -e . - - - name: Determine analysis date - id: date - run: | - if [ -n "${{ github.event.inputs.date }}" ]; then - echo "analysis_date=${{ github.event.inputs.date }}" >> "$GITHUB_OUTPUT" - else - echo "analysis_date=$(date -u +%Y-%m-%d)" >> "$GITHUB_OUTPUT" - fi - - - name: Run discovery pipeline - env: - # LLM keys (set whichever provider you use) - GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - # Data source keys - FINNHUB_API_KEY: ${{ secrets.FINNHUB_API_KEY }} - ALPHA_VANTAGE_API_KEY: ${{ secrets.ALPHA_VANTAGE_API_KEY }} - FMP_API_KEY: ${{ secrets.FMP_API_KEY }} - REDDIT_CLIENT_ID: ${{ secrets.REDDIT_CLIENT_ID }} - REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET }} - TRADIER_API_KEY: ${{ secrets.TRADIER_API_KEY }} - run: | - python scripts/run_daily_discovery.py \ - --date "${{ steps.date.outputs.analysis_date }}" \ - --no-update-positions - - - name: Commit recommendations to repo - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - # Stage new/updated recommendation files - git add data/recommendations/ || true - git add results/ || true - - # Only commit if there are changes - if git diff --cached --quiet; then - echo "No new recommendations to commit" - else - git commit -m "chore: daily discovery ${{ steps.date.outputs.analysis_date }}" - git push - fi - - - name: Update positions - if: success() - env: - FINNHUB_API_KEY: ${{ secrets.FINNHUB_API_KEY }} - run: | - python scripts/update_positions.py - - - name: Commit position updates - if: success() - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add data/recommendations/ || true - if git diff --cached --quiet; then - echo "No position updates" - else - git commit -m "chore: update positions ${{ steps.date.outputs.analysis_date }}" - git push - fi - - - name: Upload results as artifact - if: always() - uses: actions/upload-artifact@v4 - with: - name: discovery-${{ steps.date.outputs.analysis_date }} - path: | - data/recommendations/${{ steps.date.outputs.analysis_date }}*.json - results/discovery/${{ steps.date.outputs.analysis_date }}/ - retention-days: 30 + - name: Checkout code + uses: actions/checkout@v2 + - name: Run discovery script + run: python your_script.py \ No newline at end of file