mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
fix(ci): authenticate git push in daily branch creation workflows
PR #24663 added persist-credentials: false to the actions/checkout step in create_daily_staging_branch.yml and create_daily_oss_agent_shin_branch.yml. The subsequent 'git push origin $BRANCH_NAME' commands no longer have credentials available and fail with 'could not read Username for https://github.com: No such device or address'. Push using an explicit URL that embeds GITHUB_TOKEN so the workflows can create the daily branches without persisting credentials on disk. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
This commit is contained in:
parent
49ca04d8c3
commit
50e3174b41
2 changed files with 6 additions and 6 deletions
|
|
@ -41,7 +41,7 @@ jobs:
|
|||
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
|
||||
# Push the new branch using the workflow token since persist-credentials: false
|
||||
git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$BRANCH_NAME"
|
||||
echo "Successfully created and pushed branch: $BRANCH_NAME"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ jobs:
|
|||
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
|
||||
# Push the new branch using the workflow token since persist-credentials: false
|
||||
git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$BRANCH_NAME"
|
||||
echo "Successfully created and pushed branch: $BRANCH_NAME"
|
||||
fi
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ jobs:
|
|||
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
|
||||
# Push the new branch using the workflow token since persist-credentials: false
|
||||
git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$BRANCH_NAME"
|
||||
echo "Successfully created and pushed branch: $BRANCH_NAME"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue