From 67a8c79dbd684e1130d23f9233ac00d329585667 Mon Sep 17 00:00:00 2001 From: windychen Date: Thu, 6 Aug 2026 14:06:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20checkout=20=E7=A7=81=E6=9C=89?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E6=B7=BB=E5=8A=A0=20Basic=20Auth=20=E8=AE=A4?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index ca46b1c..5593e37 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -10,10 +10,13 @@ jobs: runs-on: docker steps: - name: Checkout code + env: + GIT_AUTH: ${{ secrets.CI_USER }}:${{ secrets.CI_PASSWORD }} run: | git init git remote add origin http://gitea:3000/windychen/windychen-utils.git - git fetch --depth 1 origin ${{ github.sha }} + AUTH_B64=$(printf '%s' "$GIT_AUTH" | base64 | tr -d '\n') + git -c http.extraHeader="Authorization: Basic ${AUTH_B64}" fetch --depth 1 origin ${{ github.sha }} git checkout ${{ github.sha }} - name: Setup npm for Verdaccio @@ -123,4 +126,3 @@ jobs: curl -s -X POST "https://oapi.dingtalk.com/robot/send?access_token=${{ secrets.DINGDING_TOKEN }}" \ -H "Content-Type: application/json" \ -d "{\"msgtype\":\"markdown\",\"markdown\":{\"title\":\"${TITLE}\",\"text\":\"## ${TITLE}\n\n${VERD_LINE}\n${GITEA_LINE}\n\n- 仓库: windychen/windychen-utils\n- 分支: ${{ github.ref_name }}\n- 提交: ${{ github.sha }}\"}}" -