From 40332cddb683893c6bd80a77331a0153582710bb Mon Sep 17 00:00:00 2001 From: merlin Date: Wed, 22 Oct 2025 11:00:11 +0800 Subject: [PATCH] feat: build test --- .gitea/workflows/build.yml | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 845e592..3a4cbcc 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -14,25 +14,28 @@ jobs: uses: actions/checkout@v4 - name: see ls run: ls - - name: see vars + # - name: see vars + # 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: echo "HARBOR is $HARBOR, TAG is $TAG" - # - name: Build and push Docker images - # 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="${vars.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 \ No newline at end of file + buildctl build \ + --frontend dockerfile.v0 \ + --local context="$dir" \ + --local dockerfile="$dir" \ + --output type=image,name="$IMAGE_NAME",push=true + done \ No newline at end of file