homelab/.github/workflows/auth-users.yml
Gonçalo Rodrigues 85930ef40f ci: switch to self-hosted runner with local k3d image import
Removes all ghcr.io and registry dependencies. Workflows now build
images locally, import them into k3d, and deploy with kubectl set image
— all on the self-hosted runner which already has Docker and kubectl.

Also removes the github Terraform provider and ci.tf since no registry
pull secrets or GitHub Actions secrets are needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 14:33:12 +01:00

38 lines
832 B
YAML

name: auth-users
on:
push:
branches: [main]
paths:
- apps/auth/services/users/**
- go.mod
- go.sum
env:
IMAGE: homelab/auth-users
jobs:
build-and-deploy:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Build image
run: |
docker build \
-t ${{ env.IMAGE }}:${{ github.sha }} \
-t ${{ env.IMAGE }}:latest \
-f apps/auth/services/users/Dockerfile \
.
- name: Import image into k3d
run: k3d image import ${{ env.IMAGE }}:${{ github.sha }} -c homelab
- name: Deploy
run: |
kubectl set image deployment/users \
users=${{ env.IMAGE }}:${{ github.sha }} \
-n auth
kubectl rollout status deployment/users -n auth --timeout=120s