Skip to content

Commit bf5ef08

Browse files
committed
Remove checkout@v6 includeIf credential entries before release push
1 parent 1dc050e commit bf5ef08

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,12 @@ runs:
264264
265265
git config user.name "github-actions[bot]"
266266
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
267-
# Remove checkout's credential helper so the app token in the URL is used
267+
# Remove checkout's credential helpers so the app token in the URL is used
268268
git config --unset-all http.https://github.com/.extraheader || true
269+
# checkout@v6 uses includeIf.gitdir entries pointing to credential files
270+
git config --local --get-regexp 'includeIf\..*\.path' | while read key value; do
271+
git config --local --unset "$key" || true
272+
done
269273
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git"
270274
# Unshallow if needed — shallow clones can cause push failures
271275
if [ -f "$(git rev-parse --git-dir)/shallow" ]; then

0 commit comments

Comments
 (0)