v0.0.1 #1

Merged
merlin merged 8 commits from dev into main 2026-03-08 08:23:30 +00:00
4 changed files with 86 additions and 77 deletions

View File

@@ -6,9 +6,9 @@ on:
jobs: jobs:
build: build:
runs-on: gitea-official-runner runs-on: gitea-runner-group-candlelight
container: container:
image: harbor.merlin.xin/testing/merlin/action_builder:471389b69e23417ab4e86981d109c79635d7219b image: registry.merlin.xin/candlelight/action_builder:v0.0.1
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -31,3 +31,6 @@ jobs:
echo "Pushing image: ${IMAGE_NAME}" echo "Pushing image: ${IMAGE_NAME}"
docker push ${IMAGE_NAME} docker push ${IMAGE_NAME}
echo "Successfully pushed: ${IMAGE_NAME}" echo "Successfully pushed: ${IMAGE_NAME}"
docker rmi ${IMAGE_NAME}
echo "cleaned up local image"

View File

@@ -6,9 +6,9 @@ on:
jobs: jobs:
build: build:
runs-on: gitea-official-runner runs-on: gitea-runner-group-candlelight
container: container:
image: harbor.merlin.xin/testing/merlin/action_builder:471389b69e23417ab4e86981d109c79635d7219b image: registry.merlin.xin/candlelight/action_builder:v0.0.1
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -24,9 +24,11 @@ jobs:
REPOSITORY: ${{ github.repository }} REPOSITORY: ${{ github.repository }}
run: | run: |
ROOT_DIR=$(pwd) ROOT_DIR=$(pwd)
IMAGE_NAME="${HARBOR_URL}/release/$REPOSITORY:$GITHUB_REF_NAME" IMAGE_NAME="${HARBOR_URL}/$REPOSITORY:$GITHUB_REF_NAME"
echo "Building image: ${IMAGE_NAME}" echo "Building image: ${IMAGE_NAME}"
docker build -t ${IMAGE_NAME} . docker build -t ${IMAGE_NAME} .
echo "Pushing image: ${IMAGE_NAME}" echo "Pushing image: ${IMAGE_NAME}"
docker push ${IMAGE_NAME} docker push ${IMAGE_NAME}
echo "Successfully pushed: ${IMAGE_NAME}" echo "Successfully pushed: ${IMAGE_NAME}"
docker rmi ${IMAGE_NAME}
echo "cleaned up local image"

View File

@@ -1,8 +1,14 @@
FROM harbor.merlin.xin/mirrors/docker.io/library/docker:24.0.6-dind FROM registry.merlin.xin/library/docker:24.0.6-dind
# 安装 Node.js # 安装 Node.js
RUN apk add --no-cache bash curl git nodejs npm RUN apk add --no-cache bash curl git nodejs npm
# 安装 helm CLI
RUN curl -fsSL https://get.helm.sh/helm-v3.13.2-linux-amd64.tar.gz -o helm.tar.gz \
&& tar -zxvf helm.tar.gz \
&& mv linux-amd64/helm /usr/local/bin/helm \
&& rm -rf linux-amd64 helm.tar.gz
WORKDIR /workspace WORKDIR /workspace
ENTRYPOINT [ "/bin/bash" ] ENTRYPOINT [ "/bin/bash" ]

View File

@@ -1,5 +1,3 @@
# action_builder # action_builder for gitea_action
自己构建的一个方便使用的docker构建器 全量的镜像构建器可以独立构建应用镜像和chart包
他一定不是最快的,但是一定是最方便、最直观的