Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b365bf356a | ||
|
|
8f782c8327 |
@@ -35,11 +35,9 @@ jobs:
|
|||||||
#检查java版本
|
#检查java版本
|
||||||
- name: Get version
|
- name: Get version
|
||||||
id: get_version
|
id: get_version
|
||||||
env:
|
# e.g. refs/tags/v1.0.0
|
||||||
REF: ${{ github.ref }} # e.g. refs/tags/v1.0.0
|
|
||||||
run: |
|
run: |
|
||||||
TAG=${REF/refs\/tags\/v}
|
echo "version=${GITHUB_REF/refs\/tags\/v}" >> $GITHUB_OUTPUT
|
||||||
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
|
||||||
- name: Check java version
|
- name: Check java version
|
||||||
run: java -version
|
run: java -version
|
||||||
- name: Show now path
|
- name: Show now path
|
||||||
@@ -65,15 +63,15 @@ jobs:
|
|||||||
|
|
||||||
# 构建并上传镜像
|
# 构建并上传镜像
|
||||||
- name: Build and push Docker image
|
- 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:
|
env:
|
||||||
TAG: ${{ steps.get_tag.outputs.tag }} # 获取上一步截取到的版本号,既 1.0.0
|
TAG: ${{ steps.get_version.outputs.version }}
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:{{ env.TAG }}
|
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||||
|
|
||||||
|
|
||||||
- name: k8s Check and Apply New Deployment
|
- name: k8s Check and Apply New Deployment
|
||||||
@@ -81,7 +79,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
||||||
with:
|
with:
|
||||||
args: apply -f http://${{ secrets.DEVOPS_GITEA_TOKEN }}@/bamanker/myk3sTest/src/branch/master/.deploy/deployment.yml
|
args: apply -f http://${{ secrets.DEVOPS_GITEA_TOKEN }}@/139.9.216.111:3000/bamanker/myk3sTest/src/branch/master/.deploy/deployment.yml
|
||||||
- name: k8s Update Deployment
|
- name: k8s Update Deployment
|
||||||
uses: http://139.9.216.111:3000/bamanker/kubectl@master
|
uses: http://139.9.216.111:3000/bamanker/kubectl@master
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user