mirror of
https://github.com/vhaudiquet/homeprod.git
synced 2025-12-19 04:26:04 +00:00
Initial commit
This commit is contained in:
9
.post-commit-sops.sh
Executable file
9
.post-commit-sops.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/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})
|
||||
if [[ "${filename}" =~ values.ya?ml$ ]] || [[ "${filename}" =~ secrets?.ya?ml$ ]]; then
|
||||
sops -d -i "${filepath}"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user