From b33dd455eaaefbbd426f8545fa310a2248dba563 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Thu, 19 Nov 2020 01:03:20 +0100 Subject: Add Kubernetes auto-deploy to the CI build stage. --- .github/workflows/lint-test-build-push.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/lint-test-build-push.yaml b/.github/workflows/lint-test-build-push.yaml index 62691ab..a18db4b 100644 --- a/.github/workflows/lint-test-build-push.yaml +++ b/.github/workflows/lint-test-build-push.yaml @@ -171,6 +171,21 @@ jobs: ghcr.io/python-discord/snekbox:latest ghcr.io/python-discord/snekbox:${{ steps.sha_tag.outputs.tag }} + # Deploy to Kubernetes + - name: Authenticate with Kubernetes + uses: azure/k8s-set-context@v1 + with: + method: kubeconfig + kubeconfig: ${{ secrets.KUBECONFIG }} + + - name: Deploy to Kubernetes + uses: Azure/k8s-deploy@v1 + with: + manifests: | + deployment.yaml + images: 'ghcr.io/python-discord/snekbox:${{ steps.sha_tag.outputs.tag }}' + kubectl-version: 'latest' + # Push the base image to GHCR, with an inline cache manifest - name: Push base image if: env.production_build == 'true' -- cgit v1.2.3