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 0d03059eaa
Some checks failed
Docker Image CI / build (push) Failing after 1m42s
fix: ci
2025-10-20 16:40:39 +08:00

30 lines
891 B
YAML

name: Docker Image CI
on:
push:
branches:
- main
jobs:
build:
runs-on: controller
container:
image: harbor.merlin.xin/mirrors/gcr.io/kaniko-project/executor:debug
steps:
- name: Checkout code
run: git clone ${GITEA_INSTANCE_URL}/merlin/test.git
- name: see ls
run: ls
- name: Build the Docker image
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