[macos-runner] Guard checkout against hanging on prompts or a stalled clone
git clone froze for 9+ minutes on one run with no clear cause. Set GIT_TERMINAL_PROMPT=0 so it fails fast instead of hanging if credential auth ever goes wrong, and abort via http.lowSpeedLimit/lowSpeedTime if the transfer genuinely stalls instead of just being slow.
This commit is contained in:
@@ -24,9 +24,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
|
export GIT_TERMINAL_PROMPT=0
|
||||||
REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git"
|
REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git"
|
||||||
AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")"
|
AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")"
|
||||||
git clone "$AUTH_URL" .
|
git -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" .
|
||||||
git checkout "${{ gitea.sha }}"
|
git checkout "${{ gitea.sha }}"
|
||||||
|
|
||||||
- name: Set build number
|
- name: Set build number
|
||||||
|
|||||||
@@ -24,9 +24,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
|
export GIT_TERMINAL_PROMPT=0
|
||||||
REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git"
|
REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git"
|
||||||
AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")"
|
AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")"
|
||||||
git clone "$AUTH_URL" .
|
git -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" .
|
||||||
git checkout "${{ gitea.sha }}"
|
git checkout "${{ gitea.sha }}"
|
||||||
|
|
||||||
- name: Verify ASC secrets
|
- name: Verify ASC secrets
|
||||||
|
|||||||
@@ -19,9 +19,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
|
export GIT_TERMINAL_PROMPT=0
|
||||||
REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git"
|
REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git"
|
||||||
AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")"
|
AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")"
|
||||||
git clone "$AUTH_URL" .
|
git -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" .
|
||||||
git checkout "${{ gitea.sha }}"
|
git checkout "${{ gitea.sha }}"
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
|
|||||||
Reference in New Issue
Block a user