mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-27 04:07:05 +00:00
🏷️ ci: Fix Helm Tag Sync Git Auth (#13460)
This commit is contained in:
parent
2ab432bd0a
commit
67398e0a69
2 changed files with 8 additions and 2 deletions
7
.github/scripts/sync-helm-chart-tags.sh
vendored
7
.github/scripts/sync-helm-chart-tags.sh
vendored
|
|
@ -17,9 +17,14 @@ fail() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
git_auth_header() {
|
||||
token="$(printf 'x-access-token:%s' "$GITHUB_TOKEN" | base64 | tr -d '\n')"
|
||||
printf 'AUTHORIZATION: basic %s' "$token"
|
||||
}
|
||||
|
||||
git_with_auth() {
|
||||
if [ -n "${GITHUB_TOKEN:-}" ]; then
|
||||
git -c "http.${GITHUB_SERVER_URL}/.extraheader=AUTHORIZATION: bearer ${GITHUB_TOKEN}" "$@"
|
||||
git -c "http.extraheader=$(git_auth_header)" "$@"
|
||||
return
|
||||
fi
|
||||
|
||||
|
|
|
|||
3
.github/workflows/sync-helm-chart-tags.yml
vendored
3
.github/workflows/sync-helm-chart-tags.yml
vendored
|
|
@ -68,7 +68,8 @@ jobs:
|
|||
git init "$REPO_DIR"
|
||||
cd "$REPO_DIR"
|
||||
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
||||
git -c "http.${GITHUB_SERVER_URL}/.extraheader=AUTHORIZATION: bearer ${GITHUB_TOKEN}" \
|
||||
AUTH_HEADER="$(printf 'x-access-token:%s' "$GITHUB_TOKEN" | base64 | tr -d '\n')"
|
||||
git -c "http.extraheader=AUTHORIZATION: basic ${AUTH_HEADER}" \
|
||||
fetch --prune --force --tags origin \
|
||||
"+refs/heads/${DEFAULT_BRANCH}:refs/remotes/origin/${DEFAULT_BRANCH}"
|
||||
git checkout --detach "$BASE_REF"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue