ci: 检出代码改为直接 clone Gitea, 摆脱对 github.com 的依赖(action 下载超时)
This commit is contained in:
@@ -8,8 +8,11 @@ jobs:
|
||||
name: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# 不用 actions/checkout: 它需从 github.com 拉取, 本网络不稳, 改为直接 clone Gitea
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
run: |
|
||||
REF="${{ github.event.pull_request.head.ref || github.ref_name }}"
|
||||
git clone --depth 1 --branch "$REF" "${{ github.server_url }}/${{ github.repository }}.git" .
|
||||
- name: 安装 uv
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
- name: 安装依赖
|
||||
|
||||
Reference in New Issue
Block a user