diff --git a/.gitea/workflows/release-image.yml b/.gitea/workflows/release-image.yml index cc6c980..b346e42 100644 --- a/.gitea/workflows/release-image.yml +++ b/.gitea/workflows/release-image.yml @@ -24,8 +24,11 @@ jobs: run: | sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories apk add --no-cache git curl bash >/dev/null + SCHEME="${GITHUB_SERVER_URL%%://*}" + SRV="${GITHUB_SERVER_URL#*://}" + echo "clone from ${SCHEME}://${SRV}" git clone --depth=1 --branch "$GITHUB_REF_NAME" \ - "https://oauth2:${GITHUB_TOKEN}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" . + "${SCHEME}://oauth2:${GITHUB_TOKEN}@${SRV}/${GITHUB_REPOSITORY}.git" . - name: go vet + go test working-directory: server @@ -49,8 +52,11 @@ jobs: run: | sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories apk add --no-cache git curl bash >/dev/null + SCHEME="${GITHUB_SERVER_URL%%://*}" + SRV="${GITHUB_SERVER_URL#*://}" + echo "clone from ${SCHEME}://${SRV}" git clone --depth=1 --branch "$GITHUB_REF_NAME" \ - "https://oauth2:${GITHUB_TOKEN}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" . + "${SCHEME}://oauth2:${GITHUB_TOKEN}@${SRV}/${GITHUB_REPOSITORY}.git" . # 嵌入产物同步(保证二进制内前端与仓库一致) if [ -f web-embed/index.html ]; then :; fi