Files
infrastructure/.gitea/workflows/apply-kubernetes.yml
Alex Mickelson ef3002e328
Some checks failed
Apply Kuberentes Configs / test-environment (push) Failing after 1s
Apply Kuberentes Configs / update-repo (push) Failing after 1s
Apply Kuberentes Configs / update-infrastructure (push) Has been skipped
environment
2026-02-07 14:12:24 -07:00

50 lines
1.8 KiB
YAML

name: Apply Kuberentes Configs
on: [push, workflow_dispatch]
jobs:
test-environment:
runs-on: home-server
steps:
- name: test basic commands
run: |
echo "=== Environment Info ==="
whoami
pwd
echo "=== Test bash ==="
bash --version
echo "=== Test git ==="
git --version
echo "=== Success ==="
update-repo:
runs-on: home-server
steps:
- name: checkout repo
working-directory: /home/gitea-runner/infrastructure
run: |
if [ -d "infrastructure" ]; then
cd infrastructure
echo "Infrastructure folder exists. Resetting to the most recent commit."
git reset --hard HEAD
git pull https://x-access-token:${{ secrets.GITEA_TOKEN }}@git.alexmickelson.guru/${{ gitea.repository }} $(git rev-parse --abbrev-ref HEAD)
else
git clone https://x-access-token:${{ secrets.GITEA_TOKEN }}@git.alexmickelson.guru/${{ gitea.repository }}.git
fi
update-infrastructure:
runs-on: home-server
needs: update-repo
steps:
- name: update home server containers
env:
KUBECONFIG: /home/gitea-runner/.kube/config
MY_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
HOMEASSISTANT_TOKEN: ${{ secrets.HOMEASSISTANT_TOKEN }}
GRAFANA_PASSWORD: ${{ secrets.GRAFANA_PASSWORD }}
CLOUDFLARE_CONFIG: ${{ secrets.CLOUDFLARE_CONFIG }}
COPILOT_TOKEN: ${{ secrets.COPILOT_TOKEN }}
working-directory: /home/gitea-runner/infrastructure/infrastructure
run: |
# kubectl apply -f kubernetes/ingress
kubectl apply -f kubernetes/proxy-ingress
kubectl annotate ingressclass nginx \
ingressclass.kubernetes.io/is-default-class="true" --overwrite