ci: Add GitHub Actions workflow to update README with latest models

This commit is contained in:
Jun Siang Cheah (aider) committed 2024-09-01 22:51:43 +01:00
1 parent 05b4c6dd28
commit 82f459c87c
1 file changed
+42
+42
View File
@@ -0,0 +1,42 @@
name: Update README
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install -r src/requirements.txt
- name: Set environment variables
run: |
echo "GROQ_API_KEY=${{ secrets.GROQ_API_KEY }}" >> .env
echo "CLOUDFLARE_ACCOUNT_ID=${{ secrets.CLOUDFLARE_ACCOUNT_ID }}" >> .env
echo "CLOUDFLARE_API_KEY=${{ secrets.CLOUDFLARE_API_KEY }}" >> .env
echo "HYPERBOLIC_API_KEY=${{ secrets.HYPERBOLIC_API_KEY }}" >> .env
echo "GCP_PROJECT_ID=${{ secrets.GCP_PROJECT_ID }}" >> .env
- name: Run script
run: |
python src/pull_available_models.py
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update README with latest models"
branch: update-readme
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: "Update README with latest models"
body: "This PR updates the README with the latest available models."
branch: update-readme
base: main