mirror of
https://github.com/whit3rabbit/anyllm-proxy.git
synced 2026-09-22 08:00:51 +00:00
36 lines
962 B
YAML
36 lines
962 B
YAML
name: Update Model Pricing
|
|
|
|
on:
|
|
schedule:
|
|
# Every Monday at 06:00 UTC
|
|
- cron: '0 6 * * 1'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-pricing:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Fetch and update pricing
|
|
run: python scripts/update_pricing.py
|
|
|
|
- name: Commit if changed
|
|
run: |
|
|
git diff --quiet assets/model_pricing.json crates/proxy/assets/model_pricing.json && {
|
|
echo "Pricing already up to date."
|
|
exit 0
|
|
}
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add assets/model_pricing.json crates/proxy/assets/model_pricing.json
|
|
git commit -m "bot: update model pricing from LiteLLM [skip ci]"
|
|
git push
|