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 }}\"}}" -