aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2020-11-19 01:03:20 +0100
committerGravatar Leon Sandøy <[email protected]>2020-11-19 01:03:20 +0100
commitb33dd455eaaefbbd426f8545fa310a2248dba563 (patch)
tree8c3da258d0441c3eda1a2d063378c4a94b6cc1ba
parentAdd a Kubernetes deployment manifest. (diff)
Add Kubernetes auto-deploy to the CI build stage.
-rw-r--r--.github/workflows/lint-test-build-push.yaml15
1 files changed, 15 insertions, 0 deletions
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'