forked from BerriAI/litellm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created github worflow to update the file and create a pull-request
- Loading branch information
1 parent
192feba
commit ac044c4
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
.github/workflows/auto_update_price_and_context_window.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,28 @@ | ||
name: Updates model_prices_and_context_window.json and Create Pull Request | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * 0" # Run every Sundays at midnight | ||
#- cron: "0 0 * * *" # Run daily at midnight | ||
|
||
jobs: | ||
auto_update_price_and_context_window: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Dependencies | ||
run: | | ||
pip install aiohttp | ||
- name: Update JSON Data | ||
run: | | ||
python ci_cd/auto_update_price_and_context_window_file.py | ||
- name: Create Pull Request | ||
run: | | ||
git add model_prices_and_context_window.json | ||
git commit -m "Update model_prices_and_context_window.json file: $(date '%Y-%m-%d')" | ||
gh pr create --title "Update model_prices_and_context_window.json file" \ | ||
--body "Automated update for model_prices_and_context_window.json" \ | ||
--head auto-update-price-and-context-window-$(date '%Y-%m-%d') \ | ||
--base main | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} |