-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (72 loc) · 2.51 KB
/
auto-commit.yml
File metadata and controls
86 lines (72 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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 }}