diff --git a/.github/workflows/create_daily_oss_agent_shin_branch.yml b/.github/workflows/create_daily_oss_agent_shin_branch.yml index d6118f3b53c..3b217b44f3f 100644 --- a/.github/workflows/create_daily_oss_agent_shin_branch.yml +++ b/.github/workflows/create_daily_oss_agent_shin_branch.yml @@ -23,25 +23,19 @@ jobs: 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_oss_agent_shin_$(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 + git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:refs/heads/$BRANCH_NAME" echo "Successfully created and pushed branch: $BRANCH_NAME" fi diff --git a/.github/workflows/create_daily_staging_branch.yml b/.github/workflows/create_daily_staging_branch.yml index 424d8de0a41..149eac9f70f 100644 --- a/.github/workflows/create_daily_staging_branch.yml +++ b/.github/workflows/create_daily_staging_branch.yml @@ -23,26 +23,20 @@ jobs: 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_oss_staging_$(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 + git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:refs/heads/$BRANCH_NAME" echo "Successfully created and pushed branch: $BRANCH_NAME" fi @@ -63,25 +57,19 @@ jobs: 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 + git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:refs/heads/$BRANCH_NAME" echo "Successfully created and pushed branch: $BRANCH_NAME" fi