From f6a77da9484f3468ed8eba0b5ed5503fa4833c44 Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Sun, 5 Apr 2026 14:45:25 +0400 Subject: [PATCH] =?UTF-8?q?fix:=20init=20submodules=20in=20CI=20=E2=80=94?= =?UTF-8?q?=20remap=20SSH=20URLs=20to=20Forgejo=20HTTPS=20with=20token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wzp-crypto depends on deps/featherchat (git submodule). Remap the origin SSH URL to the Forgejo HTTPS mirror with github.token auth. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/build.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 96d8fc4..60aa13d 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -24,8 +24,11 @@ jobs: - name: Checkout run: | apt-get update && apt-get install -y git curl - CLONE_URL=$(echo "${{ github.server_url }}/${{ github.repository }}.git" | sed "s|://|://${{ github.token }}@|") - git clone --depth 1 --branch ${{ github.ref_name }} "$CLONE_URL" . + AUTH_URL="${{ github.server_url }}/${{ github.repository }}.git" + AUTH_URL=$(echo "$AUTH_URL" | sed "s|://|://${{ github.token }}@|") + git clone --depth 1 --branch ${{ github.ref_name }} "$AUTH_URL" . + git config --global url."https://${{ github.token }}@git.tbs.amn.gg/".insteadOf "ssh://git@git.manko.yoga:222/" + git submodule update --init --depth 1 - name: Install Rust and dependencies run: | @@ -75,8 +78,11 @@ jobs: - name: Checkout run: | apt-get update && apt-get install -y git curl - CLONE_URL=$(echo "${{ github.server_url }}/${{ github.repository }}.git" | sed "s|://|://${{ github.token }}@|") - git clone --depth 1 --branch ${{ github.ref_name }} "$CLONE_URL" . + AUTH_URL="${{ github.server_url }}/${{ github.repository }}.git" + AUTH_URL=$(echo "$AUTH_URL" | sed "s|://|://${{ github.token }}@|") + git clone --depth 1 --branch ${{ github.ref_name }} "$AUTH_URL" . + git config --global url."https://${{ github.token }}@git.tbs.amn.gg/".insteadOf "ssh://git@git.manko.yoga:222/" + git submodule update --init --depth 1 - name: Install Rust and cross-compilation tools run: | @@ -121,8 +127,11 @@ jobs: - name: Checkout run: | apt-get update && apt-get install -y git curl - CLONE_URL=$(echo "${{ github.server_url }}/${{ github.repository }}.git" | sed "s|://|://${{ github.token }}@|") - git clone --depth 1 --branch ${{ github.ref_name }} "$CLONE_URL" . + AUTH_URL="${{ github.server_url }}/${{ github.repository }}.git" + AUTH_URL=$(echo "$AUTH_URL" | sed "s|://|://${{ github.token }}@|") + git clone --depth 1 --branch ${{ github.ref_name }} "$AUTH_URL" . + git config --global url."https://${{ github.token }}@git.tbs.amn.gg/".insteadOf "ssh://git@git.manko.yoga:222/" + git submodule update --init --depth 1 - name: Install Rust and cross-compilation tools run: |