mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix(actions): create the missing PR on rerun when the branch was pushed but PR creation failed
This commit is contained in:
parent
486fbe8080
commit
a77855ef75
1 changed files with 4 additions and 0 deletions
|
|
@ -43,6 +43,10 @@ jobs:
|
|||
echo "No changes to commit."
|
||||
else
|
||||
git commit -m "Update model_prices_and_context_window.json file: $(date +'%Y-%m-%d')"
|
||||
fi
|
||||
if git diff --quiet "origin/${BASE_BRANCH}" -- model_prices_and_context_window.json; then
|
||||
echo "Pricing file matches ${BASE_BRANCH}; nothing to publish."
|
||||
else
|
||||
git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "${BRANCH_NAME}"
|
||||
if [ "$(gh pr list --head "${BRANCH_NAME}" --state open --json number --jq 'length')" -gt 0 ]; then
|
||||
echo "PR already exists for ${BRANCH_NAME}."
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue