mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-13 03:59:12 +00:00
fix(ci): authenticate git push in create_daily_staging_branch
After dfb543369b added persist-credentials: false to actions/checkout
(addressing zizmor comments), the subsequent 'git push origin' commands
failed with 'fatal: could not read Username for https://github.com'
because no credential helper was configured.
Push via an explicit authenticated URL using GITHUB_TOKEN so both the
create-staging-branch and create-internal-dev-branch jobs work again.
Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
This commit is contained in:
parent
b7e978a5c3
commit
6e7138f89f
1 changed files with 6 additions and 4 deletions
|
|
@ -41,8 +41,9 @@ 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 via authenticated URL; checkout uses persist-credentials: false
|
||||
# so the local repo has no credentials configured for `git push origin`.
|
||||
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 +82,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 via authenticated URL; checkout uses persist-credentials: false
|
||||
# so the local repo has no credentials configured for `git push origin`.
|
||||
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