Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d97d39e5c4 | ||
|
|
55f57f9085 | ||
|
|
0389942e4f |
@@ -40,7 +40,8 @@ jobs:
|
||||
id: set_envar
|
||||
run: |
|
||||
echo "The app version is $APP_TAG" && echo "tag=$APP_TAG" >> $GITHUB_OUTPUT &&
|
||||
echo "now workspace: ${{ github.workspace }}"
|
||||
echo "now workspace: ${{ github.workspace }}" &&
|
||||
pwd
|
||||
|
||||
# 为其他配置文件注入环境变量
|
||||
- name: Inject envVar
|
||||
@@ -83,22 +84,20 @@ jobs:
|
||||
|
||||
#发布到 k8s
|
||||
- name: k8s Check and Apply New Deployment
|
||||
uses: http://139.9.216.111:3000/bamanker/steevchen-kubectl@master
|
||||
|
||||
uses: http://139.9.216.111:3000/bamanker/kubectl-action@v1.4.0
|
||||
with:
|
||||
config: ${{ secrets.KUBE_CONFIG }}
|
||||
command: apply -f ./deployment.yml
|
||||
base64-kube-config: ${{ secrets.KUBE_CONFIG }}
|
||||
- run: kubectl apply -f ./deployment.yml
|
||||
# command: apply -f http://139.9.216.111:3000/bamanker/myk3sTest/raw/branch/master/.deploy/deployment-temp.yml
|
||||
- name: k8s Check Pods Health
|
||||
uses: http://139.9.216.111:3000/bamanker/steevchen-kubectl@master
|
||||
uses: http://139.9.216.111:3000/bamanker/kubectl-action@v1.4.0
|
||||
with:
|
||||
config: ${{ secrets.KUBE_CONFIG }}
|
||||
command: get pod -n default -l app=${{ env.APP_NAME }}
|
||||
base64-kube-config: ${{ secrets.KUBE_CONFIG }}
|
||||
- run: kubectl get pod -n default -l app=${{ env.APP_NAME }}
|
||||
|
||||
- name: k8s Update Deployment
|
||||
uses: http://139.9.216.111:3000/bamanker/steevchen-kubectl@master
|
||||
env:
|
||||
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
||||
uses: http://139.9.216.111:3000/bamanker/kubectl-action@v1.4.0
|
||||
with:
|
||||
command: rollout restart deployment ${{ env.APP_NAME }}-${{ gitea.ref_name }}
|
||||
base64-kube-config: ${{ secrets.KUBE_CONFIG }}
|
||||
- run: kubectl rollout restart deployment ${{ env.APP_NAME }}-${{ gitea.ref_name }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user