Skip to content

Auto-Commit Evolution Changes #1475

Auto-Commit Evolution Changes

Auto-Commit Evolution Changes #1475

Workflow file for this run

name: Auto-Commit Evolution Changes
on:
push:
branches: [ main, development ]
schedule:
# Run every hour to check for evolution changes
- cron: '0 * * * *'
workflow_dispatch:
jobs:
auto-commit-changes:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyyaml gitpython requests
- name: Check for evolution changes
id: check_changes
run: |
python .github/scripts/check_evolution_changes.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate evolution report
if: steps.check_changes.outputs.has_changes == 'true'
run: |
python .github/scripts/generate_evolution_report.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and push changes
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git config --local user.email "living-llm-bot@users.noreply.github.com"
git config --local user.name "Living-LLM Evolution Bot"
# Add all changed files
git add .
# Create commit message with evolution details
COMMIT_MSG=$(cat evolution_report.md | head -n 5 | tail -n 1)
git commit -m "🧬 Evolution Update: $COMMIT_MSG" -m "$(cat evolution_report.md)"
# Push changes
git push
- name: Create evolution release
if: steps.check_changes.outputs.major_evolution == 'true'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: evolution-${{ steps.check_changes.outputs.evolution_id }}
release_name: 🧬 Major Evolution ${{ steps.check_changes.outputs.evolution_id }}
body_path: evolution_report.md
draft: false
prerelease: false
- name: Update README stats
run: |
python .github/scripts/update_readme_stats.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Notify Discord/Slack
if: steps.check_changes.outputs.has_changes == 'true'
run: |
python .github/scripts/notify_evolution.py
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}