This repository has been archived on 2025-11-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
test/.gitea/workflows/build.yml
merlin b07141417c
All checks were successful
Docker Image CI / build (push) Successful in 2s
fix: build test
2025-10-22 11:01:21 +08:00

38 lines
1.0 KiB
YAML

name: Docker Image CI
on:
push:
branches:
- main
jobs:
build:
runs-on: gitea-official-runner
container:
image: harbor.merlin.xin/testing/merlin/buildkit-node:v0.13.20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: see ls
run: ls
- name: see vars
run: /usr/local/bin/buildctl --version
# - name: Build and push Docker images
# env:
# HARBOR: ${{ vars.HARBOR }}
# TAG: ${{ github.sha }}
# run: |
# ROOT_DIR=$(pwd)
# # 遍历所有包含 Dockerfile 的目录
# find . -type f -name "Dockerfile" | while read dockerfile; do
# dir=$(dirname "$dockerfile")
# name=$(basename "$dir")
# 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