diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index c50c47c..eb8f61d 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -11,36 +11,34 @@ jobs: shell: bash run: | echo "Preparing to update ${{ vars.DNS_SERVER }}..." - echo "Finished." - -# run: git diff HEAD^ HEAD > zone_diff.txt -# while IFS= read -r line; do -# case "$line" in -# "--- "*".zone") -# CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //') -# ;; -# "+++"*) -# ;; -# "-"* | "+"*) -# if [[ $line == -* ]]; then # Enregistrement supprimé -# RECORD=$(echo "$line" | sed 's/^-//') -# echo - $RECORD -# echo nsupdate -k $TSIG_KEY < zone_diff.txt + while IFS= read -r line; do + case "$line" in + "--- "*".zone") + CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //') + ;; + "+++"*) + ;; + "-"* | "+"*) + if [[ $line == -* ]]; then # Enregistrement supprimé + RECORD=$(echo "$line" | sed 's/^-//') + echo "- $RECORD" + # nsupdate -k $TSIG_KEY <