Compare commits

..

7 Commits

Author SHA1 Message Date
dbecd67471 modified: README.md
All checks were successful
Casa Home Assistant CI/CD Pipeline / deploy (push) Successful in 18s
modified:   deploy/README.md
renamed:    deploy/rbac.yaml -> deploy/cicd-rbac.yaml
2025-11-22 22:57:43 +00:00
2881eb1167 modified: deploy/deployment.yaml
All checks were successful
Casa Home Assistant CI/CD Pipeline / deploy (push) Successful in 16s
2025-11-22 18:51:39 +00:00
755d68a844 modified: deploy/deployment.yaml
All checks were successful
Casa Home Assistant CI/CD Pipeline / deploy (push) Successful in 18s
2025-11-22 18:36:03 +00:00
f40a899200 modified: .gitea/workflows/deploy.yaml
All checks were successful
Casa Home Assistant CI/CD Pipeline / deploy (push) Successful in 17s
2025-11-22 17:57:01 +00:00
d30aad3058 modified: .gitea/workflows/deploy.yaml
All checks were successful
Casa Home Assistant CI/CD Pipeline / deploy (push) Successful in 17s
2025-11-22 17:51:36 +00:00
6149826bc6 modified: .gitea/workflows/deploy.yaml
modified:   README.md
2025-11-22 17:50:45 +00:00
0d2b30a83a fix/cicd (#3)
Co-authored-by: Márcio Fernandes <marcio.fernandes@outlook.pt>
Reviewed-on: #3
2025-11-22 17:43:57 +00:00
6 changed files with 17 additions and 40 deletions

View File

@@ -1,14 +1,17 @@
name: Casa Home Assistant CI/CD Pipeline (testing)
name: Casa Home Assistant CI/CD Pipeline
on:
push:
branches:
- fix/*
- main
- master
pull_request:
schedule:
- cron: '0 16 * * 0' # every sunday 4 pm
jobs:
build:
deploy:
runs-on: casa-vlan-cicd
env:
GITHUB_TEMP: ${{ runner.temp }}
@@ -40,9 +43,6 @@ jobs:
INGRESS_ROUTES_MATCH: "${{ secrets.CASA_HOMEASSISTANT_INGRESS_ROUTES_MATCH }}"
INGRESS_TLS_SECRET_NAME: "${{ secrets.CASA_HOMEASSISTANT_INGRESS_TLS_SECRET_NAME }}"
run: |
#set -x for debugging
set -e
cd ${{ gitea.workspace }}
kubectl apply -f ./deploy/deployment.yaml
envsubst < ./deploy/service.template.yaml | kubectl apply -f -
kubectl apply -f ./deploy/deployment.yaml \
&& envsubst < ./deploy/service.template.yaml | kubectl apply -f -

View File

@@ -1,28 +0,0 @@
set -euo pipefail
echo "fetching actions."
# check arguments
ERROR=0
if [ -z "${RUNNER_TEMP}" ]; then
echo "❌ ERROR: missing env RUNNER_TEMP"
$ERROR=1
fi
if [ -z "${WORKSPACE}" ]; then
echo "❌ ERROR: missing env WORKSPACE"
$ERROR=1
fi
if [ "$ERROR" != 0 ]; then
exit "$ERROR"
fi
# end check arguments
mkdir -p ${RUNNER_TEMP}/gitea_src
mkdir -p ${WORKSPACE}/.gitea/limbo_actions
git clone -b main --depth=1 https://git.limbosolutions.com/kb/gitea ${RUNNER_TEMP}/gitea_src
for dir in ${RUNNER_TEMP}/gitea_src/.gitea/actions/*; do
ln -s "$dir" "${WORKSPACE}/.gitea/limbo_actions/$(basename "$dir")"
done

View File

@@ -2,10 +2,9 @@
Welcome to my Home Assistant setup repository.
This repository documents and maintains the Home Assistant instance running in my home, hosted on casa server k3s cluster.
All essential containers, such as MQTT and speech recognition, are hosted on the same server for seamless integration.
Related containers, such as MQTT and speech recognition, are hosted on same cluster.
<!-- omit in toc -->
## Table of Contents
**Table of Contents:**
- [Devices](#devices)
- [Broadlink - RM4 Pro](#broadlink---rm4-pro)

View File

@@ -44,8 +44,8 @@ All Environment variables requirements as set as secrets.
[gitea workflow](../.gitea/workflows/deploy.yaml)
## RBAC
## cicd RBAC
```bash { cwd=../ }
kubectl apply -f ./deploy/rbac.yaml
kubectl apply -f ./deploy/cicd-rbac.yaml
```

View File

@@ -33,9 +33,15 @@ spec:
spec:
dnsPolicy: ClusterFirstWithHostNet # ensures pod uses cluster DNS (CoreDNS) for service discovery even with host networking
hostNetwork: true
nodeName: casa # force deploy to master node cluster
tolerations:
- key: "node-role.kubernetes.io/control-plane" # allow installation on control-plane
operator: "Exists"
effect: "NoSchedule"
containers:
- name: home-assistant
image: "homeassistant/home-assistant"
imagePullPolicy: Always
env:
- name: TZ
value: Europe/Lisbon # set timezone