Compare commits

..

3 Commits
v0.2 ... v0.5

Author SHA1 Message Date
bamanker
f279baf126 版本号为tag 0
Some checks failed
Build Push and Deploy Image / build (push) Failing after 15s
2025-12-24 23:47:34 +08:00
bamanker
6d86a69c0b 版本号为tag 0
Some checks failed
Build Push and Deploy Image / build (push) Failing after 43s
2025-12-24 23:26:30 +08:00
bamanker
cc7e260325 版本号为tag
Some checks failed
Build Push and Deploy Image / build (push) Failing after 46s
2025-12-24 23:22:38 +08:00

View File

@@ -2,8 +2,12 @@ name: Build Push and Deploy Image
on:
push:
branches:
- main
#tag 触发
tags:
- 'v*'
# 分支触发
# branches:
# - main
workflow_dispatch: #手动构建h
env:
@@ -22,13 +26,16 @@ jobs:
# 下载仓库源码依赖java环境因此构建服务器本地需要下载安装java并设置环境变量
- name: Checkout repository code
uses: http://139.9.216.111:3000/bamanker/checkout@v6
# - name: Set up Java
# uses: https://gitee.com/bamanker/setup-java@v5
# with:
# java-version: '25.0.1'
# distribution: 'openjdk'
# cache: 'maven'
# - name: Set up Java
# uses: https://gitee.com/bamanker/setup-java@v5
# with:
# java-version: '25.0.1'
# distribution: 'openjdk'
# cache: 'maven'
#检查java版本
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Check java version
run: java -version
- name: Show now path
@@ -46,7 +53,7 @@ jobs:
# 这里也可以通过 secrets 传入,后面再介绍
password: ${{ secrets.DOCKERHUB_PASSWORD }}
# 获取时间戳,用于设置镜像 TAG 版本
# 获取时间戳
- name: Get datetime
id: datetime
run: |
@@ -60,7 +67,7 @@ jobs:
platforms: linux/amd64
file: Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.datetime.outputs.datetime }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:{{ steps.get_version.outputs.VERSION }}
- name: k8s Check and Apply New Deployment