Skip to content

Create ChargingService.deploy.yml #1

Create ChargingService.deploy.yml

Create ChargingService.deploy.yml #1

name: ChargingService Docker Image CD
on:
push:
branches: [ "master" ]
paths:
- .github/workflows/ChargingService.deploy.yml
- ChargingService/**
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 smarthome-web=tschissler/chargingservice:${{ github.run_id }}
microk8s kubectl set env deployment/chargingservice KebaIP_CarPort="keba-stellplatz"
microk8s kubectl set env deployment/charginservice PowerDogPassword="${{ secrets.POWERDOG_PASSWORD }}"
microk8s kubectl set env deployment/charginservice KEBA_WRITE_TO_DEVICE=false