mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
build(reset_stable.yml): add new workflow to reset litellm_stable to latest release
This commit is contained in:
parent
5f15b0aa20
commit
19e67b8c0e
1 changed files with 40 additions and 0 deletions
40
.github/workflows/reset_stable.yml
vendored
Normal file
40
.github/workflows/reset_stable.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: Reset litellm_stable branch
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
update-stable-branch:
|
||||
if: ${{ startsWith(github.event.release.tag_name, 'v') && !endsWith(github.event.release.tag_name, '-stable') }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Reset litellm_stable_test_1 branch to the release commit
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# Configure Git user
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
# Fetch all branches and tags
|
||||
git fetch --all
|
||||
|
||||
# Check if the litellm_stable_test_1 branch exists
|
||||
if git show-ref --verify --quiet refs/remotes/origin/litellm_stable_test_1; then
|
||||
echo "litellm_stable_test_1 branch exists."
|
||||
git checkout litellm_stable_test_1
|
||||
else
|
||||
echo "litellm_stable_test_1 branch does not exist. Creating it."
|
||||
git checkout -b litellm_stable_test_1
|
||||
fi
|
||||
|
||||
# Reset litellm_stable_test_1 branch to the release commit
|
||||
git reset --hard $GITHUB_SHA
|
||||
|
||||
# Push the updated litellm_stable_test_1 branch
|
||||
git push origin litellm_stable_test_1 --force
|
Loading…
Add table
Add a link
Reference in a new issue