Compare commits

...

4 Commits
v0.4 ... v0.6

Author SHA1 Message Date
bamanker
8f782c8327 版本号为tag 0000000
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m44s
2025-12-25 00:10:20 +08:00
bamanker
a92abc0425 版本号为tag 00000
Some checks failed
Build Push and Deploy Image / build (push) Failing after 14s
2025-12-24 23:57:34 +08:00
bamanker
2c7953a17e 版本号为tag 000
Some checks failed
Build Push and Deploy Image / build (push) Failing after 0s
2025-12-24 23:54:25 +08:00
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

View File

@@ -2,9 +2,9 @@ name: Build Push and Deploy Image
on:
push:
# #tag 触发
# tags:
# - 'v*'
#tag 触发
tags:
- 'v*'
# 分支触发
# branches:
# - main
@@ -35,7 +35,9 @@ jobs:
#检查java版本
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
# e.g. refs/tags/v1.0.0
run: |
echo "version=${GITHUB_REF/refs\/tags\/v}" >> $GITHUB_OUTPUT
- name: Check java version
run: java -version
- name: Show now path
@@ -53,7 +55,7 @@ jobs:
# 这里也可以通过 secrets 传入,后面再介绍
password: ${{ secrets.DOCKERHUB_PASSWORD }}
# 获取时间戳,用于设置镜像 TAG 版本
# 获取时间戳
- name: Get datetime
id: datetime
run: |
@@ -61,13 +63,15 @@ jobs:
# 构建并上传镜像
- name: Build and push Docker image
uses: http://139.9.216.111:3000/bamanker/build-push-action@v6
uses: http://139.9.216.111:3000/bamanker/build-push-action@v6 # 获取上一步截取到的版本号,既 1.0.0
env:
TAG: ${{ steps.get_version.outputs.version }}
with:
context: .
platforms: linux/amd64
file: Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:{{ steps.get_version.outputs.VERSION }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
- name: k8s Check and Apply New Deployment