aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-08-18 21:56:06 +0100
committerGravatar Chris Lovering <[email protected]>2024-08-18 21:56:52 +0100
commite6a9a4969691a3bada484efb33a92a9fe8851c0f (patch)
treea9dd5a898c85ed8e1861e32844bfe3fb39d4085c /.github
parentAdd debug router for debugging endpoints (diff)
Add deployment on commits to main
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-deploy.yaml28
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/build-deploy.yaml b/.github/workflows/build-deploy.yaml
index 7a845f1..3b6048a 100644
--- a/.github/workflows/build-deploy.yaml
+++ b/.github/workflows/build-deploy.yaml
@@ -50,3 +50,31 @@ jobs:
ghcr.io/owl-corp/thallium-${{ inputs.project }}:${{ inputs.sha-tag }}
build-args: |
git_sha=${{ github.sha }}
+
+ deploy:
+ name: Deploy
+ needs: build
+ runs-on: ubuntu-latest
+ if: ${{ github.ref == 'refs/heads/main' }}
+ steps:
+ - name: Checkout Kubernetes repository
+ uses: actions/checkout@v4
+ with:
+ repository: python-discord/infra
+ path: infra
+
+ - uses: azure/setup-kubectl@v4
+
+ - name: Authenticate with Kubernetes
+ uses: azure/k8s-set-context@v4
+ with:
+ method: kubeconfig
+ kubeconfig: ${{ secrets.KUBECONFIG }}
+
+ - name: Deploy to Kubernetes
+ uses: azure/k8s-deploy@v5
+ with:
+ namespace: merch
+ manifests: |
+ infra/kubernetes/namespaces/merch/deployment.yaml
+ images: 'ghcr.io/owl-corp/thallium:${{ inputs.sha-tag }}'