From fbc4b73d4b38827447de4ab5c512072169ff1afa Mon Sep 17 00:00:00 2001 From: Isshi0417 Date: Tue, 7 Jul 2026 06:47:58 +0000 Subject: [PATCH] Add GitOps deployment workflow --- .gitea/workflows/deploy.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..e30c5e9 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,33 @@ +name: Homelab Deployment Pipeline + +on: + push: + branches: + - main + +jobs: + deploy-dns: + runs-on: self-hosted + container: + image: docker.io/willhallonline/ansible:latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up SSH private key + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + echo -e "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh/config + + - name: Set up vault password + run: | + echo "${{ secrets.VAULT_PASSWORD }}" > ansible/vault_pass + chmod 600 ansible/vault_pass + + - name: Execute DNS playbook + run: | + cd ansible + ansible-navigator run configure_dns.yml --mode stdout --ee false --vault-password-file vault_pass