Initial Commit
All checks were successful
Deploy / Prepare Build (push) Successful in 13s

This commit is contained in:
2025-09-08 18:29:40 +10:00
commit 12444311a4
59 changed files with 2931 additions and 0 deletions

13
.gitea/workflows/deploy.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
changed_tasks=($(git diff --name-only $1 $2 | grep '\.yml$'))
if [ ! -z "$changed_tasks" ]; then
for task in "${changed_tasks[@]}"; do
tag=$(echo "$task" | awk -F/ '{print $2}')
if [[ "$tag" != "deploy-homelab.yml" && "$tag" != "main.yml" && "$tag" != "all.yml" && "$tag" != "all.example.yml" && "$tag" != "ISSUE_TEMPLATE" && "$tag" != "workflows" ]] ; then
tag=${tag%.*}_install
ansible-playbook main.yml --tags "$tag" --vault-password-file ~/.vault_password.txt
fi
done
else
echo "No changes detected in task files. Skipping Ansible playbook execution."
fi