-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.25 KB
/
smarthome.web.deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Smarthome.Web Docker Image CD
on:
push:
branches: [ "master" ]
paths:
- .github/workflows/smarthome.web.deploy.yml
- Smarthome.Web/**
- Smarthome.Controls/**
jobs:
build:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v3
- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: calver
increment: patch
- name: Build and publish Docker image
run: |
# Build the Docker image with the package version tag.
docker build -t tschissler/smarthome.web:${{ github.run_id }} -t tschissler/smarthome.web:latest -f ./Smarthome.Web/Dockerfile --push .
- name: Update Kubernetes deployment
run: |
microk8s kubectl set image deployments/smarthome-web smarthome-web=tschissler/smarthome.web:${{ github.run_id }}
microk8s kubectl set env deployment/smarthome-web SyncfusionLicenseKey="${{ secrets.SYNCFUSION_LICENSEKEY }}"
microk8s kubectl set env deployment/smarthome-web PVServiceUrl="http://pvservice-service.default.svc.cluster.local:31003"
microk8s kubectl set env deployment/smarthome-web ChargingServiceUrl="http://chargingservice-service.default.svc.cluster.local:31004"