Run Gitea workflow on Debian host runner
Homelab Main / validate (push) Failing after 9s Details
Homelab Main / running-update (push) Has been skipped Details
Homelab Main / debian-ops (push) Has been skipped Details

This commit is contained in:
juvenal.diaz 2026-11-09 18:40:00 -06:00
parent 16053cc9f3
commit 4d22f68da5
2 changed files with 27 additions and 20 deletions

View File

@ -1,5 +1,5 @@
name: Homelab Main
# Runner policy: k8s handles running-homelab updates; homelab-debian handles create/recreate operations.
# The Debian host runner is the supported online runner for this repository.
"on":
push:
@ -9,16 +9,14 @@ name: Homelab Main
jobs:
validate:
runs-on: k8s
container: golang:1.23-bookworm
runs-on: homelab-debian
steps:
- name: Install Toolchain (Python, Node)
- name: Check host toolchain
run: |
set -e
# Install PyYAML via apt (avoiding PEP 668)
apt-get update && apt-get install -y --no-install-recommends python3-yaml
# Install Node 18 via binary (using gzipped tarball to avoid xz dependency)
curl -fsSL https://nodejs.org/dist/v18.19.0/node-v18.19.0-linux-x64.tar.gz | tar -xz -C /usr/local --strip-components=1
command -v python3
command -v node
python3 -c 'import yaml'
- name: Check out repository
run: |
set -e
@ -31,16 +29,11 @@ jobs:
./jeannie validate
running-update:
runs-on: k8s
container: golang:1.23-bookworm
runs-on: homelab-debian
needs:
- validate
if: ${{ gitea.ref == 'refs/heads/main' }}
steps:
- name: Install Toolchain (Python)
run: |
set -e
apt-get update && apt-get install -y --no-install-recommends python3-yaml
- name: Check out repository
run: |
set -e
@ -55,7 +48,7 @@ jobs:
echo "Host-managed create/recreate change detected; Debian runner will handle it."
exit 0
fi
echo "Running homelab update accepted on the K8s runner."
echo "Running homelab update accepted on the Debian runner."
echo "Argo CD will reconcile repo-managed applications from main."
debian-ops:
@ -75,7 +68,7 @@ jobs:
printf '%s\n' "${classification}"
mode="$(printf '%s\n' "${classification}" | awk -F= '$1 == "mode" { print $2; exit }')"
if [ "${mode}" != "debian-ops" ]; then
echo "App-only running-homelab update; K8s runner handled this path."
echo "App-only running-homelab update; the update policy handled this path."
exit 0
fi
- name: Block automatic deploy for external Gitea changes
@ -208,13 +201,18 @@ jobs:
fi
if [ "${deploy_dir}" != "${workspace_dir}" ]; then
echo "Persistent deploy checkout: ${deploy_dir}"
if [ -n "$(git -C "${deploy_dir}" status --porcelain)" ]; then
echo "Deploy checkout has local changes; refusing to overwrite them." >&2
exit 1
fi
if [ "$(git -C "${deploy_dir}" branch --show-current)" != main ]; then
echo "Deploy checkout is not on main; refusing to switch branches." >&2
exit 1
fi
git -C "${deploy_dir}" fetch "${workspace_dir}" HEAD
git -C "${deploy_dir}" checkout -B main FETCH_HEAD
git -C "${deploy_dir}" reset --hard FETCH_HEAD
git -C "${deploy_dir}" merge --ff-only FETCH_HEAD
else
echo "Deploy checkout: ${deploy_dir}"
git -C "${deploy_dir}" checkout -B main HEAD
git -C "${deploy_dir}" reset --hard HEAD
fi
# Set up local-bootstrap remote if the directory exists

View File

@ -4,6 +4,15 @@ The default deployment has zero replicas across all profiles. The active CI
runner is the Debian-host `homelab-gitea-runner.service`; native K3s and Pimox
workers do not provide a host Docker socket automatically.
The `Homelab Main` workflow uses the Debian runner's `homelab-debian:host`
label for validation and update jobs. These run directly as the runner user,
so Python, PyYAML and Node must already be installed; the workflow does not
install packages or download an architecture-specific Node binary. Optional
validation tools may be skipped by `./jeannie validate` when unavailable.
Main-branch host operations remain automatic where the workflow classifies a
change for Debian operations. Its persistent deploy checkout must be clean and
on `main`, and it is updated only by a fast-forward merge.
Argo CD detects `kustomization.yaml` and renders only namespace, deployment and
PVC resources. The neighboring SOPS files and parent `application.yaml` must
not be applied as raw resources. Encrypted API versions/kinds are ciphertext,