62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
name: Manual TradingAgents Analysis
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
ticker:
|
|
description: 'Stock ticker symbol to analyze'
|
|
required: true
|
|
default: 'NVDA'
|
|
type: string
|
|
date:
|
|
description: 'Analysis date (YYYY-MM-DD format, leave empty for today)'
|
|
required: false
|
|
default: ''
|
|
type: string
|
|
|
|
jobs:
|
|
analyze:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Set analysis date
|
|
id: set_date
|
|
run: |
|
|
if [ "${{ github.event.inputs.date }}" != "" ]; then
|
|
echo "date=${{ github.event.inputs.date }}" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Create output directory
|
|
run: mkdir -p results/github-actions
|
|
|
|
- name: Run TradingAgents Analysis
|
|
env:
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
FINNHUB_API_KEY: ${{ secrets.FINNHUB_API_KEY }}
|
|
TRADINGAGENTS_TICKER: ${{ github.event.inputs.ticker }}
|
|
TRADINGAGENTS_DATE: ${{ steps.set_date.outputs.date }}
|
|
TRADINGAGENTS_OUTPUT_PATH: results/github-actions/analysis-${{ github.run_number }}.md
|
|
run: |
|
|
python cli/non_interactive.py
|
|
|
|
- name: Upload analysis results
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: trading-analysis-${{ github.event.inputs.ticker }}-${{ steps.set_date.outputs.date }}
|
|
path: results/github-actions/
|
|
retention-days: 30 |