Skip to content

llmXive Automation

llmXive Automation #9

name: llmXive Automation
on:
schedule:
# Run every 3 hours
- cron: '0 */3 * * *'
workflow_dispatch:
inputs:
task:
description: 'Specific task to run (optional)'
required: false
type: choice
options:
- '' # Auto mode
- 'brainstorm_ideas'
- 'develop_technical_design'
- 'write_review'
- 'implement_research'
- 'generate_paper'
- 'validate_references'
model:
description: 'Model override (optional)'
required: false
type: string
dry_run:
description: 'Run in dry-run mode'
required: false
type: boolean
default: false
permissions:
contents: write
issues: write
pull-requests: write
jobs:
research-cycle:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: Cache models
uses: actions/cache@v3
with:
path: ~/.cache/huggingface
key: ${{ runner.os }}-huggingface-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-huggingface-
- name: Install dependencies
run: |
cd code/llmxive-automation
pip install -e helpers/
pip install -r helpers/requirements.txt
- name: Set environment variables
run: |
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
echo "HF_TOKEN=${{ secrets.HF_TOKEN }}" >> $GITHUB_ENV
echo "TRANSFORMERS_CACHE=~/.cache/huggingface" >> $GITHUB_ENV
- name: Run automation
run: |
cd code/llmxive-automation
# Build command based on inputs
CMD="python -m llmxive_automation"
if [ "${{ github.event.inputs.task }}" != "" ]; then
CMD="$CMD --mode single-task --task ${{ github.event.inputs.task }}"
fi
if [ "${{ github.event.inputs.model }}" != "" ]; then
CMD="$CMD --model ${{ github.event.inputs.model }}"
fi
if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
CMD="$CMD --dry-run"
fi
echo "Running: $CMD"
$CMD
- name: Commit changes
if: github.event.inputs.dry_run != 'true'
uses: EndBug/add-and-commit@v9
with:
message: |
🤖 Automated research update
Generated by llmXive Automation System
Task: ${{ github.event.inputs.task || 'auto' }}
add: '.'
default_author: github_actions
- name: Upload logs
if: always()
uses: actions/upload-artifact@v3
with:
name: automation-logs
path: |
**/*.log
**/automation-report.json
retention-days: 7
- name: Report status
if: always()
run: |
if [ "${{ job.status }}" == "success" ]; then
echo "✅ Automation completed successfully"
else
echo "❌ Automation failed"
exit 1
fi