mirror of
https://github.com/LiteyukiStudio/spage.git
synced 2026-01-25 21:22:10 +00:00
✨ 更新 Docker 构建流程,简化 Harbor 镜像推送步骤,直接使用 docker build/push 进行 amd64 构建
This commit is contained in:
8
.github/workflows/build-aio.yaml
vendored
8
.github/workflows/build-aio.yaml
vendored
@@ -133,11 +133,13 @@ jobs:
|
|||||||
imagename="$url/$namespace:$TAG"
|
imagename="$url/$namespace:$TAG"
|
||||||
echo "$token" | docker login "$url" -u "$user" --password-stdin
|
echo "$token" | docker login "$url" -u "$user" --password-stdin
|
||||||
|
|
||||||
# 如果是 Harbor,只推送 amd64
|
|
||||||
if [[ "$url" == "reg.liteyuki.org" ]]; then
|
if [[ "$url" == "reg.liteyuki.org" ]]; then
|
||||||
docker buildx build --platform linux/amd64 -f ./Dockerfile -t "$imagename" --push .
|
# 只构建 amd64,直接用 docker build/push
|
||||||
|
docker build -t "$imagename" -f ./Dockerfile .
|
||||||
|
docker push "$imagename"
|
||||||
if [[ "${{ steps.version.outputs.nightly }}" == "false" ]]; then
|
if [[ "${{ steps.version.outputs.nightly }}" == "false" ]]; then
|
||||||
docker buildx build --platform linux/amd64 -f ./Dockerfile -t "$url/$namespace:latest" --push .
|
docker tag "$imagename" "$url/$namespace:latest"
|
||||||
|
docker push "$url/$namespace:latest"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
docker buildx build --platform linux/amd64,linux/arm64 -f ./Dockerfile -t "$imagename" --push .
|
docker buildx build --platform linux/amd64,linux/arm64 -f ./Dockerfile -t "$imagename" --push .
|
||||||
|
|||||||
Reference in New Issue
Block a user