t
This commit is contained in:
@@ -26,8 +26,6 @@ env:
|
||||
CONTAINER_NAME: checkin_sys-container
|
||||
LOCAL_PORT: 8800
|
||||
CONTAINER_PORT: 8800
|
||||
# 使用国内镜像源加速 Actions
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -36,19 +34,31 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 设置国内镜像源
|
||||
env:
|
||||
# 使用 ghproxy 代理 GitHub 资源
|
||||
GH_PROXY: https://ghproxy.com/
|
||||
run: |
|
||||
# 配置 git 代理
|
||||
git config --global url."https://ghproxy.com/".insteadOf "https://github.com/"
|
||||
git config --global url."https://github.com/".insteadOf "https://ghproxy.com/https://github.com/"
|
||||
|
||||
- name: 配置 Docker 镜像源
|
||||
run: |
|
||||
sudo mkdir -p /etc/docker
|
||||
| sudo tee /etc/docker/daemon.json << 'EOF'
|
||||
{
|
||||
"registry-mirrors": [
|
||||
"https://docker.mirrors.ustc.edu.cn",
|
||||
"https://hub-mirror.c.163.com",
|
||||
"https://mirror.baidubce.com"
|
||||
]
|
||||
}
|
||||
EOF
|
||||
sudo service docker restart || true
|
||||
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 设置 Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver-opts: |
|
||||
image=moby/buildkit:buildx-stable-1
|
||||
|
||||
- name: 提取架构信息
|
||||
id: arch
|
||||
@@ -87,11 +97,22 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 设置国内镜像源
|
||||
env:
|
||||
GH_PROXY: https://ghproxy.com/
|
||||
run: |
|
||||
git config --global url."https://ghproxy.com/".insteadOf "https://github.com/"
|
||||
git config --global url."https://github.com/".insteadOf "https://ghproxy.com/https://github.com/"
|
||||
|
||||
- name: 配置 Docker 镜像源
|
||||
run: |
|
||||
sudo mkdir -p /etc/docker
|
||||
| sudo tee /etc/docker/daemon.json << 'EOF'
|
||||
{
|
||||
"registry-mirrors": [
|
||||
"https://docker.mirrors.ustc.edu.cn",
|
||||
"https://hub-mirror.c.163.com",
|
||||
"https://mirror.baidubce.com"
|
||||
]
|
||||
}
|
||||
EOF
|
||||
sudo service docker restart || true
|
||||
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user