From d26c12c2ea5e70cc05d32ae6d8295a3bbaf042a7 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Sat, 21 Oct 2023 17:07:33 +0200 Subject: [PATCH] change to k0s deploy --- .github/workflows/publish.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b95c745..a44c7d4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -58,11 +58,18 @@ jobs: push: true tags: "ghcr.io/bbn-holding/bbn-bot:latest" - - name: Deploy - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - key: ${{ secrets.KEY }} - port: ${{ secrets.PORT }} - script: cd bbn/ && docker compose up -d --pull always bbn-bot \ No newline at end of file + - name: Set up Kubectl + run: | + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x kubectl + sudo mv kubectl /usr/local/bin/ + + - name: Configure Kubernetes credentials + env: + KUBECONFIG_DATA: ${{ secrets.KUBE_CREDENTIALS }} + run: | + echo "$KUBECONFIG_DATA" | base64 --decode > kubeconfig.yaml + + - name: Restart Rollout + run: | + kubectl rollout restart deployment bbn-bot -n bbn-one --kubeconfig=kubeconfig.yaml \ No newline at end of file