From cdda8aad16f5e66056604a42e26577fabcd728ee Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 12 Aug 2024 17:12:13 +0300 Subject: feat(main-branch): Kubernetes deployment now first rolls out old k8s and then new --- .github/workflows/main-branch.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main-branch.yml b/.github/workflows/main-branch.yml index b9fe837..33fd0f0 100644 --- a/.github/workflows/main-branch.yml +++ b/.github/workflows/main-branch.yml @@ -39,11 +39,15 @@ jobs: runs-on: ubuntu-latest needs: Build-docker-and-push steps: - - uses: actions/checkout@v4 - uses: medyagh/setup-minikube@master - name: Pull (release) docker image run: | docker pull ${{ secrets.DOCKERHUB_USERNAME }}/pico-web-server:latest + + - name: Checkout previous + uses: actions/checkout@v4 + with: + ref: $${{ github.event.before }} - name: Minikube deploy run: | kubectl apply -f kubernetes/ @@ -51,6 +55,17 @@ jobs: - name: Minikube use run: | minikube service list + + - name: Checkout current + uses: actions/checkout@v4 + - name: Minikube update + run: | + kubectl apply -f kubernetes/ + kubectl rollout status deployment/pico-web-server-deployment + - name: Minikube use + run: | + minikube service list + - name: Minikube stop run: | minikube stop -- cgit v1.2.3