fix: init submodules in CI — remap SSH URLs to Forgejo HTTPS with token

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) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-04-05 14:45:25 +04:00
parent 82015a78af
commit f6a77da948

View File

@@ -24,8 +24,11 @@ jobs:
- name: Checkout - name: Checkout
run: | run: |
apt-get update && apt-get install -y git curl apt-get update && apt-get install -y git curl
CLONE_URL=$(echo "${{ github.server_url }}/${{ github.repository }}.git" | sed "s|://|://${{ github.token }}@|") AUTH_URL="${{ github.server_url }}/${{ github.repository }}.git"
git clone --depth 1 --branch ${{ github.ref_name }} "$CLONE_URL" . 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 - name: Install Rust and dependencies
run: | run: |
@@ -75,8 +78,11 @@ jobs:
- name: Checkout - name: Checkout
run: | run: |
apt-get update && apt-get install -y git curl apt-get update && apt-get install -y git curl
CLONE_URL=$(echo "${{ github.server_url }}/${{ github.repository }}.git" | sed "s|://|://${{ github.token }}@|") AUTH_URL="${{ github.server_url }}/${{ github.repository }}.git"
git clone --depth 1 --branch ${{ github.ref_name }} "$CLONE_URL" . 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 - name: Install Rust and cross-compilation tools
run: | run: |
@@ -121,8 +127,11 @@ jobs:
- name: Checkout - name: Checkout
run: | run: |
apt-get update && apt-get install -y git curl apt-get update && apt-get install -y git curl
CLONE_URL=$(echo "${{ github.server_url }}/${{ github.repository }}.git" | sed "s|://|://${{ github.token }}@|") AUTH_URL="${{ github.server_url }}/${{ github.repository }}.git"
git clone --depth 1 --branch ${{ github.ref_name }} "$CLONE_URL" . 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 - name: Install Rust and cross-compilation tools
run: | run: |