fix(ci): checkout 私有仓库添加 Basic Auth 认证
Node.js Build / build (push) Has been skipped

This commit is contained in:
2026-08-06 14:06:08 +08:00
parent 1a720443db
commit 67a8c79dbd
+4 -2
View File
@@ -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 }}\"}}"