From a6dd560259a646a846ec1c945ec99ab1c8b044df Mon Sep 17 00:00:00 2001 From: "firedcto@gmail.com" Date: Fri, 15 Nov 2024 17:43:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9B=B4=E6=96=B0=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a07247c..e871302 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,7 +60,11 @@ jobs: CODING_PASSWORD: ${{ secrets.CODING_PASSWORD }} run: | git config --global credential.helper store - echo "https://${CODING_USERNAME}:${CODING_PASSWORD}@e.coding.net" > $env:HOMEPATH\.git-credentials + $credentialsPath = [System.IO.Path]::Combine($env:HOMEPATH, ".git-credentials") + if (-not (Test-Path -Path $credentialsPath -PathType Leaf)) { + New-Item -ItemType File -Force -Path $credentialsPath + } + "https://${{ secrets.CODING_USERNAME }}:${{ secrets.CODING_PASSWORD }}@e.coding.net" | Out-File -FilePath $credentialsPath -Encoding ASCII - name: Push to Coding.net run: |