add deploy workflow
Some checks failed
Deploy Containers / Prepare (push) Has been cancelled

This commit is contained in:
2025-07-29 19:59:50 -04:00
parent f046245080
commit 91cd66debe
5 changed files with 228 additions and 165 deletions

View File

@@ -0,0 +1,13 @@
#!/bin/bash
# all new/updated tasks in the diff
new_tasks = ($(git diff --name-only $1 $2 | grep '\.yml$'))
if [! -z "$new_tasks"]; then
for task in "${new_tasks[@]}"; do
ansible_tag=$(echo "$task" | awk '{print $2}')
if [[ "$tag" != "all.yml" && "$tag" !== "all.template.yml" && "$tag" !== "main.yml" ]]
tag = ${tag%.*}_deploy
ansible-playbook --tags "$tag" --vault-password-file ~/.vault_password.txt
fi
done