fix: fix: edge entrypoint clones disinto repo without auth — fails when Forgejo requires authentication (#353)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9830e6ce53
commit
9a0b205f34
1 changed files with 5 additions and 3 deletions
|
|
@ -5,11 +5,13 @@ set -euo pipefail
|
|||
export USER="${USER:-root}"
|
||||
|
||||
DISINTO_VERSION="${DISINTO_VERSION:-main}"
|
||||
DISINTO_REPO="${FORGE_URL:-http://forgejo:3000}/${FORGE_REPO:-disinto-admin/disinto}.git"
|
||||
FORGE_URL="${FORGE_URL:-http://forgejo:3000}"
|
||||
FORGE_REPO="${FORGE_REPO:-disinto-admin/disinto}"
|
||||
|
||||
# Shallow clone at the pinned version
|
||||
# Shallow clone at the pinned version (inject token to support auth-required Forgejo)
|
||||
if [ ! -d /opt/disinto/.git ]; then
|
||||
git clone --depth 1 --branch "$DISINTO_VERSION" "$DISINTO_REPO" /opt/disinto
|
||||
_auth_url=$(printf '%s' "$FORGE_URL" | sed "s|://|://token:${FORGE_TOKEN}@|")
|
||||
git clone --depth 1 --branch "$DISINTO_VERSION" "${_auth_url}/${FORGE_REPO}.git" /opt/disinto
|
||||
fi
|
||||
|
||||
# Start dispatcher in background
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue