Compare commits

...

25 Commits

Author SHA1 Message Date
bamanker
6d1dc22670 修改安装的docker命令
Some checks failed
Build Push and Deploy Image / build (push) Failing after 58s
2025-12-31 10:13:34 +08:00
bamanker
52e4616bb3 安装 tee 命令3 切换ubuntu版本
Some checks failed
Build Push and Deploy Image / build (push) Failing after 4m55s
2025-12-31 10:03:35 +08:00
bamanker
79fba8746f 安装 tee 命令2
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m4s
2025-12-31 09:52:58 +08:00
bamanker
80122ebe57 安装 tee 命令1 2025-12-31 09:50:30 +08:00
bamanker
148672031f 安装 tee 命令
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m0s
2025-12-31 09:39:38 +08:00
bamanker
fdcc48178f Merge remote-tracking branch 'origin/runson-image' into runson-image
Some checks failed
Build Push and Deploy Image / build (push) Failing after 57s
2025-12-31 09:32:18 +08:00
bamanker
1f9029baf1 修改安装docker命令,切换为国内源
Some checks failed
Build Push and Deploy Image / build (push) Has been cancelled
2025-12-31 09:31:28 +08:00
bamanker
df57e63c3e 修改安装docker命令,切换为国内源
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m28s
2025-12-31 09:30:32 +08:00
bamanker
d6b67b428b 修改安装docker命令
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m33s
2025-12-31 09:24:50 +08:00
bamanker
f3eeaf48fd 修改docker命令
Some checks failed
Build Push and Deploy Image / build (push) Has been cancelled
2025-12-31 09:14:14 +08:00
bamanker
46f1b7ca22 手动输入命令构建docker镜像并上传1
Some checks failed
Build Push and Deploy Image / build (push) Failing after 19m45s
2025-12-31 01:08:50 +08:00
bamanker
c7d1bedf79 手动输入命令构建docker镜像并上传
Some checks failed
Build Push and Deploy Image / build (push) Failing after 20m0s
2025-12-31 00:40:55 +08:00
bamanker
8dc0e1f9d7 修改一些内容2
Some checks failed
Build Push and Deploy Image / build (push) Failing after 19m44s
2025-12-31 00:15:39 +08:00
bamanker
5cb44e596c 修改一些内容1
Some checks failed
Build Push and Deploy Image / build (push) Failing after 7m17s
2025-12-30 23:03:37 +08:00
bamanker
2f9ff5f9c9 修改一些内容
Some checks failed
Build Push and Deploy Image / build (push) Has been cancelled
2025-12-30 23:02:05 +08:00
bamanker
cfbd38a09d Merge branch 'graalvm' into runson-image
# Conflicts:
#	.gitea/workflows/build.yml
2025-12-30 18:00:37 +08:00
bamanker
93a1aa6465 add action docker buildx
Some checks failed
Build Push and Deploy Image / build (push) Failing after 7m39s
2025-12-30 17:52:26 +08:00
bamanker
6adc7bc789 fix bugs
Some checks failed
Build Push and Deploy Image / build (push) Failing after 19m36s
2025-12-30 17:15:17 +08:00
bamanker
899beb46ff 增加docker依赖
Some checks failed
Build Push and Deploy Image / build (push) Failing after 7s
2025-12-30 17:13:49 +08:00
bamanker
d78dd16a8d 增加maven依赖
Some checks failed
Build Push and Deploy Image / build (push) Failing after 22m48s
2025-12-30 16:44:45 +08:00
bamanker
057cb5de38 本地build fix3
Some checks failed
Build Push and Deploy Image / build (push) Failing after 22m31s
2025-12-30 10:40:41 +08:00
bamanker
bf1f52ad54 本地build fix2
Some checks failed
Build Push and Deploy Image / build (push) Failing after 17s
2025-12-30 10:33:08 +08:00
bamanker
1696261450 本地build fix1
Some checks failed
Build Push and Deploy Image / build (push) Failing after 19s
2025-12-30 10:28:31 +08:00
bamanker
5ca35df955 本地build
Some checks failed
Build Push and Deploy Image / build (push) Failing after 21s
2025-12-30 10:06:49 +08:00
bamanker
21bc585376 修改了deploy参数 2025-12-29 22:58:14 +08:00
3 changed files with 40 additions and 22 deletions

View File

@@ -21,7 +21,9 @@ env:
# 构建 Job
jobs:
build:
runs-on: ubuntu-node24 # 如果host构建 linux_amd64
runs-on: ubuntu-node22 # 如果host构建 linux_amd64
# container:
# image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/ghcr.io/catthehacker/ubuntu:act-latest
steps:
- name: Print system info 1
run: echo " The job was automatically triggered by a ${{ gitea.event_name }} event."
@@ -32,15 +34,27 @@ jobs:
- name: Print env
run: env
- name: Install dependencies
run: apt-get update && apt-get install -y gettext
run: apt-get update &&
apt-get install -y gettext &&
apt-get install -y maven &&
apt-get install coreutils &&
apt-get update &&
apt-get install docker-ce-cli
- name: Generate maven config
uses: http://139.9.216.111:3000/bamanker/maven-settings-action@v3.1.0
with:
mirrors: '[{"id": "alimaven", "name": "aliyun maven", "mirrorOf": "central", "url": "http://maven.aliyun.com/nexus/content/groups/public/"}]'
# - uses: http://localhost:3000/bamanker/setup-node@v6
# with:
# node-version: 24
# cache: 'npm'
# - run: node -v
# - uses: http://localhost:3000/bamanker/setup-node@v6
# with:
# node-version: 24
# cache: 'npm'
# - run: node -v
# 下载仓库源码依赖node环境因此构建服务器本地需要下载安装node并设置环境变量
# - name: Set up Docker Buildx
# uses: http://139.9.216.111:3000/bamanker/setup-buildx-action@v3
- name: Checkout repository code
#使用自定义仓库action
uses: http://139.9.216.111:3000/bamanker/checkout@v4
@@ -58,7 +72,8 @@ jobs:
run: |
echo "The app version is $APP_TAG" && echo "tag=$APP_TAG" >> $GITHUB_OUTPUT &&
echo "now workspace: ${{ github.workspace }}" &&
pwd
pwd &&
docker version
# 为其他配置文件注入环境变量
- name: Inject envVar
@@ -93,18 +108,20 @@ jobs:
# run: |
# echo "datetime=$(date '+%Y-%m-%d-%H-%M-%S')" >> $GITHUB_OUTPUT
# 构建并上传镜像
# 构建并上传镜像 TODO 直接用docker命令操作
- name: Build and push Docker image
uses: http://139.9.216.111:3000/bamanker/build-push-action@v4 # 获取上一步截取到的版本号,既 1.0.0
# uses: http://139.9.216.111:3000/bamanker/build-push-action@v4 # 获取上一步截取到的版本号,既 1.0.0
#只能这样接收
env:
TAG: ${{ steps.set_envar.outputs.tag }}
with:
context: .
platforms: linux/amd64
file: Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
run: |
docker buildx build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} --push .
# with:
# context: .
## platforms: linux/amd64
# file: Dockerfile
# push: true
# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
#发布到 k8s
- name: Generate kubeconfig

View File

@@ -29,14 +29,15 @@ spec:
- image: $REGISTRY/$IMAGE_NAMESPACE/$IMAGE_NAME:$APP_TAG
name: $APP_NAME
imagePullPolicy: Always
readinessProbe:
livenessProbe: # 存活探针:失败意味着应用彻底挂了,需要重启来恢复
httpGet:
path: /test
port: 9090
initialDelaySeconds: 1
timeoutSeconds: 10
failureThreshold: 30
successThreshold: 5
initialDelaySeconds: 10 # 延迟xx秒开始执行
periodSeconds: 15 # 每隔15秒执行一次
timeoutSeconds: 10 # 10秒未返回结果则超时
failureThreshold: 10 # 探测失败后的重试次数,当达到这个次数后就判定结果为失败
# successThreshold: 5
ports:
- containerPort: 9090
imagePullSecrets:

View File

@@ -11,7 +11,7 @@
<groupId>com.bamanker</groupId>
<artifactId>myk3sTest</artifactId>
<version>v3.1.0-native</version>
<version>v3.1-native</version>
<name>myk3sTest</name>
<description>myk3sTest</description>
<url/>