mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 06:33:41 +00:00
feat(infra): schedule daily model profile refresh with job summary
This commit is contained in:
18
.github/workflows/refresh_model_profiles.yml
vendored
18
.github/workflows/refresh_model_profiles.yml
vendored
@@ -1,11 +1,15 @@
|
||||
# Refreshes model profile data for all in-monorepo partner integrations by
|
||||
# pulling the latest metadata from models.dev via the `langchain-profiles` CLI.
|
||||
#
|
||||
# Creates a pull request with any changes. Triggered manually from the Actions UI.
|
||||
# Creates a pull request with any changes. Runs daily and can be triggered
|
||||
# manually from the Actions UI. Uses a fixed branch so each run supersedes
|
||||
# any stale PR from a previous run.
|
||||
|
||||
name: "🔄 Refresh Model Profiles"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 8 * * *" # daily at 08:00 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
@@ -63,6 +67,7 @@ jobs:
|
||||
private-key: ${{ secrets.MODEL_PROFILE_BOT_PRIVATE_KEY }}
|
||||
|
||||
- name: "🔀 Create pull request"
|
||||
id: create-pr
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
@@ -74,4 +79,15 @@ jobs:
|
||||
integrations via `langchain-profiles refresh`.
|
||||
|
||||
🤖 Generated by the `refresh_model_profiles` workflow.
|
||||
labels: bot
|
||||
add-paths: libs/partners/**/data/_profiles.py
|
||||
|
||||
- name: "📝 Summary"
|
||||
run: |
|
||||
op="${{ steps.create-pr.outputs.pull-request-operation }}"
|
||||
url="${{ steps.create-pr.outputs.pull-request-url }}"
|
||||
if [ "$op" = "created" ] || [ "$op" = "updated" ]; then
|
||||
echo "### ✅ PR ${op}: ${url}" >> "$GITHUB_STEP_SUMMARY"
|
||||
else
|
||||
echo "### ⏭️ Skipped: profiles already up to date" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user