wasn't catching the container tag
All checks were successful
Deploy Containers / Prepare (push) Successful in 10s

This commit is contained in:
2025-07-29 21:33:52 -04:00
parent 3d172a5818
commit 112c4c34bf
2 changed files with 5 additions and 6 deletions

View File

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

View File

@@ -10,5 +10,3 @@
- name: homelab - name: homelab
volumes: volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro" - "/var/run/docker.sock:/var/run/docker.sock:ro"
env:
- DUMMY_ENV: "dummy_env"