mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-07-25 08:54:43 +00:00
fix(ci): use http.extraheader instead of credential helper
The credential helper approach fails because GITHUB_TOKEN env var is not available when git push runs inside collection-docs-action. Switch to http.extraheader which embeds the auth as a static git config value, matching the approach checkout v4 used. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
5
.github/workflows/docs.yml
vendored
5
.github/workflows/docs.yml
vendored
@@ -53,8 +53,9 @@ jobs:
|
||||
- name: Set up git credentials for gh-pages push
|
||||
run: |
|
||||
cd ${{ env.collection_dir }}
|
||||
git config credential.helper \
|
||||
'!f() { echo "username=x-access-token"; echo "password=${GITHUB_TOKEN}"; }; f'
|
||||
BASIC_AUTH=$(echo -n "x-access-token:${GITHUB_TOKEN}" | base64)
|
||||
git config --local http.https://github.com/.extraheader \
|
||||
"AUTHORIZATION: basic ${BASIC_AUTH}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -60,8 +60,9 @@ jobs:
|
||||
|
||||
- name: Set up git credentials
|
||||
run: |
|
||||
git config credential.helper \
|
||||
'!f() { echo "username=x-access-token"; echo "password=${GITHUB_TOKEN}"; }; f'
|
||||
BASIC_AUTH=$(echo -n "x-access-token:${GITHUB_TOKEN}" | base64)
|
||||
git config --local http.https://github.com/.extraheader \
|
||||
"AUTHORIZATION: basic ${BASIC_AUTH}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user