diff --git a/.gitea/workflows/repo-manage-daily.yml b/.gitea/workflows/repo-manage-daily.yml index d3b260f2a..7dcda2cba 100644 --- a/.gitea/workflows/repo-manage-daily.yml +++ b/.gitea/workflows/repo-manage-daily.yml @@ -96,6 +96,7 @@ jobs: shell: bash env: GITEA_BASE_URL: ${{ vars.GITEA_BASE_URL }} + GITEA_USERNAME: ${{ vars.GITEA_USERNAME }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} TARGET_OWNER: ${{ vars.TARGET_OWNER }} TARGET_REPO: ${{ vars.TARGET_REPO }} @@ -108,14 +109,15 @@ jobs: fi base="${GITEA_BASE_URL:-https://git.halonice.com}" base="${base%/}" + username="${GITEA_USERNAME:-yuanzhen869}" owner="${TARGET_OWNER:-yuanzhen869}" repo="${TARGET_REPO:-shunt-rules-release}" branch="${TARGET_BRANCH:-main}" if [[ "${base}" == https://* ]]; then - release_url="https://${GITEA_TOKEN}@${base#https://}/${owner}/${repo}.git" + release_url="https://${username}:${GITEA_TOKEN}@${base#https://}/${owner}/${repo}.git" elif [[ "${base}" == http://* ]]; then - release_url="http://${GITEA_TOKEN}@${base#http://}/${owner}/${repo}.git" + release_url="http://${username}:${GITEA_TOKEN}@${base#http://}/${owner}/${repo}.git" else echo "GITEA_BASE_URL must start with http:// or https://" >&2 exit 1 diff --git a/README.md b/README.md index 07de78054..5658014e4 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ bash scripts/release_dist.sh - `secrets.GITEA_TOKEN`(必需) - `vars.GITEA_BASE_URL`(可选,默认 `https://git.halonice.com`) +- `vars.GITEA_USERNAME`(可选,默认 `yuanzhen869`) - `vars.TARGET_OWNER`(可选,默认 `yuanzhen869`) - `vars.TARGET_REPO`(可选,默认 `shunt-rules-release`) - `vars.TARGET_BRANCH`(可选,默认 `main`)