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