ci test
Some checks failed
Docker Image CI / build (push) Failing after 21s

This commit is contained in:
merlin
2025-10-20 15:09:42 +08:00
parent c23cf94bd1
commit 3df0658949
5 changed files with 315 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
name: Docker Image CI
on:
push:
branches:
- main
jobs:
build:
runs-on: controller
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
image: harbor.merlin.xin/mirrors/gcr.io/kaniko-project/executor:debug
run: |
for df in $(find . -name Dockerfile); do
dir=$(dirname "$df")
image_name="${vars.REGISTRY_URL}/testing/merlin/$(basename $dir):${gitea.sha:0:7}"
/kaniko/executor \
--dockerfile "$df" \
--context "$dir" \
--destination "$image_name" \
--cache=true \
--username "${secrets.HARBOR_USER_NAME}" \
--password "${secrets.HARBOR_USER_SECRET}"
echo "✅ Successfully built and pushed $image_name"
done