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:
@@ -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: |
|
||||
|
||||
Reference in New Issue
Block a user