fix: use username+token auth for release publish
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user