修改基础镜像
Some checks failed
/ build-parent-pom (push) Successful in 2m6s
/ build-and-push-services (ruoyi-auth) (push) Failing after 1m24s
/ build-and-push-services (ruoyi-gateway) (push) Failing after 1m26s
/ build-and-push-services (ruoyi-modules/Property) (push) Failing after 1m37s
/ build-and-push-services (ruoyi-modules/Sis) (push) Failing after 35s
/ build-and-push-services (ruoyi-modules/ruoyi-gen) (push) Failing after 1m1s
/ build-and-push-services (ruoyi-modules/ruoyi-job) (push) Failing after 1m31s
/ build-and-push-services (ruoyi-modules/ruoyi-resource) (push) Failing after 1m29s
/ build-and-push-services (ruoyi-modules/ruoyi-system) (push) Failing after 1m34s
/ build-and-push-services (ruoyi-modules/ruoyi-workflow) (push) Failing after 0s
/ build-and-push-services (ruoyi-seata-server) (push) Failing after 21s
/ build-and-push-services (ruoyi-sentinel-dashboard) (push) Failing after 20s
/ build-and-push-services (ruoyi-snailjob-server) (push) Failing after 22s
/ build-and-push-services (ruoyi-visual/ruoyi-monitor) (push) Failing after 1m29s
/ build-and-push-services (ruoyi-visual/ruoyi-nacos) (push) Failing after 1m14s
Some checks failed
/ build-parent-pom (push) Successful in 2m6s
/ build-and-push-services (ruoyi-auth) (push) Failing after 1m24s
/ build-and-push-services (ruoyi-gateway) (push) Failing after 1m26s
/ build-and-push-services (ruoyi-modules/Property) (push) Failing after 1m37s
/ build-and-push-services (ruoyi-modules/Sis) (push) Failing after 35s
/ build-and-push-services (ruoyi-modules/ruoyi-gen) (push) Failing after 1m1s
/ build-and-push-services (ruoyi-modules/ruoyi-job) (push) Failing after 1m31s
/ build-and-push-services (ruoyi-modules/ruoyi-resource) (push) Failing after 1m29s
/ build-and-push-services (ruoyi-modules/ruoyi-system) (push) Failing after 1m34s
/ build-and-push-services (ruoyi-modules/ruoyi-workflow) (push) Failing after 0s
/ build-and-push-services (ruoyi-seata-server) (push) Failing after 21s
/ build-and-push-services (ruoyi-sentinel-dashboard) (push) Failing after 20s
/ build-and-push-services (ruoyi-snailjob-server) (push) Failing after 22s
/ build-and-push-services (ruoyi-visual/ruoyi-monitor) (push) Failing after 1m29s
/ build-and-push-services (ruoyi-visual/ruoyi-nacos) (push) Failing after 1m14s
This commit is contained in:
parent
6410e15b88
commit
8b9e053517
@ -191,15 +191,51 @@ jobs:
|
||||
echo "dockerfile_path=${GITHUB_WORKSPACE}/Dockerfile" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
# - name: 构建并推送Docker镜像(仅推送镜像,不上传JAR)
|
||||
# uses: http://git.missmoc.top/mocheng/build-push-action@v5
|
||||
# with:
|
||||
# context: "${{ github.workspace }}"
|
||||
# file: ${{ github.workspace }}/${{ matrix.service }}/Dockerfile
|
||||
# tags: 172.100.10.45:3000/by2025/smartparks/${{ matrix.service }}:latest
|
||||
# # tags: ${{ secrets.REGISTRY_URL }}/by2025/$(echo ${{ matrix.service }} | tr 'A-Z' 'a-z'):${{ github.sha }}
|
||||
# # tags: ${{ secrets.REGISTRY_URL }}/by2025/${{ matrix.service }}:2.0.4
|
||||
# push: true
|
||||
# cache-from: type=gha
|
||||
# cache-to: type=gha,mode=max
|
||||
#
|
||||
- name: 构建并推送Docker镜像(仅推送镜像,不上传JAR)
|
||||
uses: http://git.missmoc.top/mocheng/build-push-action@v5
|
||||
with:
|
||||
# 指定构建上下文为当前工作目录
|
||||
context: "${{ github.workspace }}"
|
||||
file: ${{ github.workspace }}/${{ matrix.service }}/Dockerfile
|
||||
tags: 172.100.10.45:3000/by2025/smartparks/${{ matrix.service }}:latest
|
||||
# tags: ${{ secrets.REGISTRY_URL }}/by2025/$(echo ${{ matrix.service }} | tr 'A-Z' 'a-z'):${{ github.sha }}
|
||||
# tags: ${{ secrets.REGISTRY_URL }}/by2025/${{ matrix.service }}:2.0.4
|
||||
|
||||
# 指定Dockerfile路径,基于矩阵中的服务名称
|
||||
file: "${{ github.workspace }}/${{ matrix.service }}/Dockerfile"
|
||||
|
||||
# 镜像标签,推送到私有仓库
|
||||
tags: "172.100.10.45:3000/by2025/smartparks/${{ matrix.service }}:latest"
|
||||
|
||||
# 启用镜像推送
|
||||
push: true
|
||||
|
||||
# 使用GitHub Actions缓存加速构建
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
# 新增:设置镜像拉取超时时间(秒)
|
||||
pull-timeout: 300
|
||||
|
||||
# 新增:构建参数,可在Dockerfile中使用ARG引用
|
||||
build-args: |
|
||||
# 示例:使用国内镜像源加速基础镜像拉取
|
||||
BASE_IMAGE_MIRROR=registry.cn-hangzhou.aliyuncs.com
|
||||
|
||||
# 新增:配置Docker守护进程的镜像加速源
|
||||
daemon-config: |
|
||||
{
|
||||
"registry-mirrors": [
|
||||
"https://registry.cn-hangzhou.aliyuncs.com",
|
||||
"https://hub-mirror.c.163.com",
|
||||
"https://mirror.baidubce.com"
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user