Update App #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update App | |
# Only trigger, when the build docker workflow succeeded | |
on: | |
workflow_run: | |
workflows: ["Docker Image CI"] | |
types: | |
- completed | |
jobs: | |
notify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: update kubernetes pod | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SERVER_HOST }} | |
username: ${{ secrets.SERVER_USERNAME }} | |
password: ${{ secrets.SERVER_PASSWORD }} | |
script: | | |
qq_bot=$(kubectl get pods -l app=qq-bot -o jsonpath='{.items[0].metadata.name}') | |
kubectl delete pod $qq_bot |