版本号为tag
Some checks failed
Build Push and Deploy Image / build (push) Failing after 46s

This commit is contained in:
bamanker
2025-12-24 23:22:38 +08:00
parent 26af5f90e5
commit cc7e260325

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:
@@ -29,6 +33,9 @@ jobs:
# distribution: 'openjdk'
# cache: 'maven'
#检查java版本
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${{ env.TAG }}
- name: Check java version
run: java -version
- name: Show now path
@@ -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