Files

10 lines
362 B
Bash
Raw Permalink Normal View History

2025-03-22 14:29:48 +01:00
#!/bin/bash
readarray f < <(git diff-tree --no-commit-id --name-only HEAD -r)
for filepath in "${f[@]}"; do
filepath=$(echo "${filepath}" | tr -d '\n')
filename=$(basename ${filepath})
2025-09-16 21:22:00 +02:00
if [[ "${filename}" =~ values.ya?ml$ ]] || [[ "${filename}" =~ secrets?.ya?ml$ ]] || [[ "${filename}" = ".env" ]]; then
2025-03-22 14:29:48 +01:00
sops -d -i "${filepath}"
fi
done