llmXive Automation #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: llmXive Automation | |
| on: | |
| schedule: | |
| # Run every 3 hours | |
| - cron: '0 */3 * * *' | |
| workflow_dispatch: | |
| inputs: | |
| max_tasks: | |
| description: 'Maximum number of tasks to execute' | |
| required: false | |
| default: '5' | |
| specific_task: | |
| description: 'Specific task type to run (optional)' | |
| required: false | |
| type: choice | |
| options: | |
| - '' | |
| - 'BRAINSTORM_IDEA' | |
| - 'WRITE_TECHNICAL_DESIGN' | |
| - 'REVIEW_TECHNICAL_DESIGN' | |
| - 'WRITE_IMPLEMENTATION_PLAN' | |
| - 'REVIEW_IMPLEMENTATION_PLAN' | |
| - 'CHECK_PROJECT_STATUS' | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| automation: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| cache-dependency-path: 'code/llmxive-automation/requirements.txt' | |
| - name: Cache models | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/huggingface | |
| key: ${{ runner.os }}-huggingface-${{ hashFiles('code/llmxive-automation/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-huggingface- | |
| - name: Install dependencies | |
| run: | | |
| cd code/llmxive-automation | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run automation | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| MAX_TASKS: ${{ github.event.inputs.max_tasks || '5' }} | |
| SPECIFIC_TASK: ${{ github.event.inputs.specific_task || '' }} | |
| run: | | |
| cd code/llmxive-automation | |
| if [ -n "$SPECIFIC_TASK" ]; then | |
| python main.py --max-tasks $MAX_TASKS --task $SPECIFIC_TASK | |
| else | |
| python main.py --max-tasks $MAX_TASKS | |
| fi | |
| - name: Upload logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: automation-logs-${{ github.run_number }} | |
| path: code/llmxive-automation/logs/ | |
| retention-days: 7 |