From 202b5b29de3b68d56c4d8bfa24a32a2d0d5d3e1e Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Wed, 11 Mar 2026 15:53:42 -0700 Subject: [PATCH] Add daily internal dev branch creation job Adds a new job to the existing daily staging branch workflow that creates a `litellm_internal_dev_MM_DD_YYYY` branch from main twice a day. This branch serves as a staging area before merging into main to improve stability. Co-Authored-By: Claude Opus 4.6 --- .../workflows/create_daily_staging_branch.yml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/create_daily_staging_branch.yml b/.github/workflows/create_daily_staging_branch.yml index 9d0093e8b1..08aebd7d04 100644 --- a/.github/workflows/create_daily_staging_branch.yml +++ b/.github/workflows/create_daily_staging_branch.yml @@ -41,3 +41,39 @@ jobs: git push origin $BRANCH_NAME echo "Successfully created and pushed branch: $BRANCH_NAME" fi + + create-internal-dev-branch: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Create internal dev branch + 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" + + # Generate branch name with MM_DD_YYYY format + BRANCH_NAME="litellm_internal_dev_$(date +'%m_%d_%Y')" + echo "Creating branch: $BRANCH_NAME" + + # Fetch all branches + git fetch --all + + # Check if the branch already exists + if git show-ref --verify --quiet refs/remotes/origin/$BRANCH_NAME; then + echo "Branch $BRANCH_NAME already exists. Skipping creation." + else + echo "Creating new branch: $BRANCH_NAME" + # Create the new branch from main + git checkout -b $BRANCH_NAME origin/main + # Push the new branch + git push origin $BRANCH_NAME + echo "Successfully created and pushed branch: $BRANCH_NAME" + fi