Compare commits
7 Commits
v3.6.6-nat
...
v3.6.7-nat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f9ff5f9c9 | ||
|
|
cfbd38a09d | ||
|
|
057cb5de38 | ||
|
|
bf1f52ad54 | ||
|
|
1696261450 | ||
|
|
5ca35df955 | ||
|
|
21bc585376 |
@@ -21,7 +21,9 @@ env:
|
||||
# 构建 Job
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-node24 # 如果host构建 :linux_amd64
|
||||
runs-on: ubuntu-act # 如果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."
|
||||
@@ -45,8 +47,8 @@ jobs:
|
||||
# - run: node -v
|
||||
# 下载仓库源码,依赖node环境,因此构建服务器本地需要下载安装node并设置环境变量
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: http://139.9.216.111:3000/bamanker/setup-buildx-action@v3
|
||||
# - name: Set up Docker Buildx
|
||||
# uses: http://139.9.216.111:3000/bamanker/setup-buildx-action@v3
|
||||
|
||||
- name: Checkout repository code
|
||||
#使用自定义仓库action
|
||||
@@ -100,7 +102,7 @@ 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
|
||||
#只能这样接收
|
||||
@@ -108,7 +110,7 @@ jobs:
|
||||
TAG: ${{ steps.set_envar.outputs.tag }}
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
# platforms: linux/amd64
|
||||
file: Dockerfile
|
||||
push: true
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user