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>
38 lines
846 B
YAML
38 lines
846 B
YAML
name: auth-gateway
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- apps/auth/services/gateway/**
|
|
- go.mod
|
|
- go.sum
|
|
|
|
env:
|
|
IMAGE: homelab/auth-gateway
|
|
|
|
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/gateway/Dockerfile \
|
|
.
|
|
|
|
- name: Import image into k3d
|
|
run: k3d image import ${{ env.IMAGE }}:${{ github.sha }} -c homelab
|
|
|
|
- name: Deploy
|
|
run: |
|
|
kubectl set image deployment/gateway \
|
|
gateway=${{ env.IMAGE }}:${{ github.sha }} \
|
|
-n auth
|
|
kubectl rollout status deployment/gateway -n auth --timeout=120s
|