Merge pull request 'v0.0.1' (#1) from dev into main
All checks were successful
Docker Image CI / build (push) Successful in 32s
All checks were successful
Docker Image CI / build (push) Successful in 32s
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
@@ -6,9 +6,9 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: gitea-official-runner
|
||||
runs-on: gitea-runner-group-candlelight
|
||||
container:
|
||||
image: harbor.merlin.xin/release/merlin/action_builder:v0.0.1
|
||||
image: ${{ vars.HARBOR_URL }}/candlelight/action_builder:v0.0.1
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -6,9 +6,9 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: gitea-official-runner
|
||||
runs-on: gitea-runner-group-candlelight
|
||||
container:
|
||||
image: harbor.merlin.xin/release/merlin/action_builder:v0.0.1
|
||||
image: ${{ vars.HARBOR_URL }}/candlelight/action_builder:v0.0.1
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
run: |
|
||||
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}"
|
||||
docker build -t ${IMAGE_NAME} .
|
||||
echo "Pushing image: ${IMAGE_NAME}"
|
||||
|
||||
26
Dockerfile
26
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM harbor.merlin.xin/mirrors/docker.io/alpine/k8s:1.30.4
|
||||
FROM registry.merlin.xin/alpine/k8s:1.30.4
|
||||
|
||||
ENV TZ=Asia/Shanghai \
|
||||
LANG=C.UTF-8
|
||||
@@ -7,13 +7,21 @@ RUN apk add --no-cache nodejs git curl ca-certificates tar\
|
||||
&& update-ca-certificates || true
|
||||
|
||||
# Install helmfile (adjust version as needed)
|
||||
RUN set -eux; \
|
||||
curl -fsSL -o /tmp/helmfile.tar.gz "https://github.com/helmfile/helmfile/releases/download/v1.1.9/helmfile_1.1.9_linux_amd64.tar.gz"; \
|
||||
mkdir -p /tmp/helmfile_extract; \
|
||||
tar -xzf /tmp/helmfile.tar.gz -C /tmp/helmfile_extract; \
|
||||
# find the helmfile binary and move it to /usr/local/bin
|
||||
find /tmp/helmfile_extract -type f -name helmfile -exec mv {} /usr/local/bin/helmfile \; ; \
|
||||
chmod +x /usr/local/bin/helmfile; \
|
||||
rm -rf /tmp/helmfile.tar.gz /tmp/helmfile_extract
|
||||
# RUN set -eux; \
|
||||
# curl -fsSL -o /tmp/helmfile.tar.gz "https://github.com/helmfile/helmfile/releases/download/v1.1.9/helmfile_1.1.9_linux_amd64.tar.gz"; \
|
||||
# mkdir -p /tmp/helmfile_extract; \
|
||||
# tar -xzf /tmp/helmfile.tar.gz -C /tmp/helmfile_extract; \
|
||||
# find the helmfile binary and move it to /usr/local/bin
|
||||
# find /tmp/helmfile_extract -type f -name helmfile -exec mv {} /usr/local/bin/helmfile \; ; \
|
||||
# chmod +x /usr/local/bin/helmfile; \
|
||||
# rm -rf /tmp/helmfile.tar.gz /tmp/helmfile_extract
|
||||
|
||||
# Copy the pre-downloaded helmfile tar.gz file to the image
|
||||
COPY helmfile_1.1.9_linux_amd64.tar.gz /tmp/helmfile.tar.gz
|
||||
RUN mkdir -p /tmp/helmfile_extract \
|
||||
&& tar -xzf /tmp/helmfile.tar.gz -C /tmp/helmfile_extract \
|
||||
&& find /tmp/helmfile_extract -type f -name helmfile -exec mv {} /usr/local/bin/helmfile \; \
|
||||
&& chmod +x /usr/local/bin/helmfile \
|
||||
&& rm -rf /tmp/helmfile.tar.gz /tmp/helmfile_extract
|
||||
|
||||
WORKDIR /workspace
|
||||
@@ -1,3 +1,5 @@
|
||||
# action_dployer
|
||||
# action_dployer for gtea_action
|
||||
|
||||
自己构建的action部署镜像,依赖chart包来部署应用到rke2集群
|
||||
用作gitea_action部署应用到k8s集群
|
||||
|
||||
包含helm和helmfile
|
||||
BIN
helmfile_1.1.9_linux_amd64.tar.gz
Normal file
BIN
helmfile_1.1.9_linux_amd64.tar.gz
Normal file
Binary file not shown.
Reference in New Issue
Block a user