Add automated k8s deployment
This commit is contained in:
committed by
Greg Hellings
parent
f236c1a538
commit
e9cb4ab2b8
@@ -7,9 +7,6 @@ env:
|
||||
IMAGE_REGISTRY_USER: ${{ github.actor }}
|
||||
IMAGE_REGISTRY_PASSWORD: ${{ github.token }}
|
||||
|
||||
# 🖊️ EDIT to specify custom tags for the container image, or default tags will be generated below.
|
||||
IMAGE_TAGS: ""
|
||||
|
||||
on:
|
||||
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows
|
||||
push:
|
||||
@@ -52,3 +49,14 @@ jobs:
|
||||
registry: ${{ env.IMAGE_REGISTRY }}
|
||||
username: ${{ env.IMAGE_REGISTRY_USER }}
|
||||
password: ${{ env.IMAGE_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Configure access to k8s
|
||||
uses: azure/k8s-set-context@v2
|
||||
with:
|
||||
method: kubeconfig
|
||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||
|
||||
- name: Update deployment to new image version
|
||||
script: |
|
||||
set -e -o pipefail
|
||||
kubectl set image deployments/www www=${{ env.IMAGE_REGISTRY }}/${{ steps.build-image.outputs.image }}:${{ steps.time.outputs.time }}
|
||||
|
||||
Reference in New Issue
Block a user