-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (24 loc) · 1.03 KB
/
ChargingService.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
name: ChargingService Docker Image CD
on:
push:
branches: [ "master" ]
paths:
- .github/workflows/ChargingService.deploy.yml
- ChargingService/**
- KebaLib/**
- PowerDogLib/**
jobs:
build:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v3
- name: Build and publish Docker image
run: |
# Build the Docker image with the package version tag.
docker build -t tschissler/chargingservice:${{ github.run_id }} -t tschissler/chargingservice:latest -f ./ChargingService/Dockerfile --push .
- name: Update Kubernetes deployment
run: |
microk8s kubectl set image deployments/chargingservice chargingservice=tschissler/chargingservice:${{ github.run_id }}
microk8s kubectl set env deployment/chargingservice KebaIP_CarPort="keba-garage"
microk8s kubectl set env deployment/chargingservice PowerDogPassword="${{ secrets.POWERDOG_PASSWORD }}"
microk8s kubectl set env deployment/chargingservice KEBA_WRITE_TO_DEVICE=false