diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index e15b512..d37c545 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -12,6 +12,7 @@ jobs: - name: 检出代码 env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + GIT_TERMINAL_PROMPT: "0" run: | set -eux SERVER_URL="${GITHUB_SERVER_URL:-${GITEA_SERVER_URL:-https://gitea.kmux.cn}}" @@ -35,13 +36,12 @@ jobs: rm -rf lightops-src if [ -n "${GITEA_TOKEN:-}" ]; then AUTH_HEADER="Authorization: Basic $(printf 'oauth2:%s' "$GITEA_TOKEN" | base64 | tr -d '\n')" - git -c http.extraHeader="$AUTH_HEADER" clone "$CLONE_URL" lightops-src + git -c http.extraHeader="$AUTH_HEADER" clone --branch "$TAG" --depth 1 --single-branch "$CLONE_URL" lightops-src else - git clone "$CLONE_URL" lightops-src + git clone --branch "$TAG" --depth 1 --single-branch "$CLONE_URL" lightops-src fi cd lightops-src - git fetch --tags --force - git checkout "$TAG" + git rev-parse --verify HEAD - name: 安装系统依赖 run: |