This commit is contained in:
@@ -13,15 +13,15 @@ jobs:
|
|||||||
# 补充:若后续要推送镜像,需替换为实际镜像仓库地址(比如你的Gitea镜像仓库)
|
# 补充:若后续要推送镜像,需替换为实际镜像仓库地址(比如你的Gitea镜像仓库)
|
||||||
REGISTRY: 116.204.74.41:3000/red-future
|
REGISTRY: 116.204.74.41:3000/red-future
|
||||||
steps:
|
steps:
|
||||||
# 新增:网络加速,解决git克隆慢的问题
|
# ========== 核心:新增国内Git代理,彻底解决GitHub拉取慢 ==========
|
||||||
- name: 配置网络加速
|
- name: 配置国内GitHub代理加速
|
||||||
run: |
|
run: |
|
||||||
# 配置git代理,加速GitHub资源拉取
|
# 全局Git代理:所有GitHub请求走国内镜像站
|
||||||
git config --global url."https://ghproxy.com/https://github.com/".insteadOf "https://github.com/"
|
git config --global url."https://ghproxy.com/https://github.com/".insteadOf "https://github.com/"
|
||||||
# 替换apt源,加速依赖安装
|
# 可选:替换Ubuntu源为清华源,加速依赖安装
|
||||||
sed -i 's/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
|
sed -i 's/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
|
||||||
apt update -y
|
apt update -y
|
||||||
# ========== 核心修改:替换checkout源,避开GitHub ==========
|
# ========== 核心修改:替换checkout源,避开GitHub ==========
|
||||||
- name: 拉取代码(Gitea官方源)
|
- name: 拉取代码(Gitea官方源)
|
||||||
uses: gitea/actions/checkout@v4
|
uses: gitea/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user