fix: build test
All checks were successful
Docker Image CI / build (push) Successful in 2s

This commit is contained in:
merlin
2025-10-22 11:01:21 +08:00
parent 40332cddb6
commit b07141417c

View File

@@ -14,28 +14,25 @@ jobs:
uses: actions/checkout@v4
- name: see ls
run: ls
# - name: see vars
- name: see vars
run: /usr/local/bin/buildctl --version
# - name: Build and push Docker images
# env:
# HARBOR: ${{ vars.HARBOR }}
# TAG: ${{ github.sha }}
# run: echo "HARBOR is $HARBOR, TAG is $TAG"
- name: Build and push Docker images
env:
HARBOR: ${{ vars.HARBOR }}
TAG: ${{ github.sha }}
run: |
ROOT_DIR=$(pwd)
# run: |
# ROOT_DIR=$(pwd)
# 遍历所有包含 Dockerfile 的目录
find . -type f -name "Dockerfile" | while read dockerfile; do
dir=$(dirname "$dockerfile")
name=$(basename "$dir")
# # 遍历所有包含 Dockerfile 的目录
# find . -type f -name "Dockerfile" | while read dockerfile; do
# dir=$(dirname "$dockerfile")
# name=$(basename "$dir")
IMAGE_NAME="${HARBOR}/testing/merlin/${name}:${TAG}"
# IMAGE_NAME="${HARBOR}/testing/merlin/${name}:${TAG}"
buildctl build \
--frontend dockerfile.v0 \
--local context="$dir" \
--local dockerfile="$dir" \
--output type=image,name="$IMAGE_NAME",push=true
done
# buildctl build \
# --frontend dockerfile.v0 \
# --local context="$dir" \
# --local dockerfile="$dir" \
# --output type=image,name="$IMAGE_NAME",push=true
# done