.forgejo/workflows/ci.yaml: WIP
/ deploy_script (push) Successful in 1s Details

This commit is contained in:
Adrien Bourmault 2024-08-20 17:29:06 +02:00
parent e240d073a1
commit bff49abf3d
Signed by: neox
GPG Key ID: 57BC26A3687116F6
1 changed files with 18 additions and 18 deletions

View File

@ -15,33 +15,33 @@ jobs:
cd dns cd dns
git diff HEAD^ HEAD > zone_diff.txt git diff HEAD^ HEAD > zone_diff.txt
echo $(cat zone_diff.txt) echo $(cat zone_diff.txt)
# while IFS= read -r line; do while IFS= read -r line; do
# case "$line" in case "$line" in
# "--- "*".zone") "--- "*".zone")
# CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //') CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //')
# ;; ;;
# "+++"*) "+++"*)
# ;; ;;
# "-"* | "+"*) "-"* | "+"*)
# if [[ $line == -* ]]; then # Enregistrement supprimé if [[ $line == -* ]]; then # Enregistrement supprimé
# RECORD=$(echo "$line" | sed 's/^-//') RECORD=$(echo "$line" | sed 's/^-//')
# echo "- $RECORD" echo "- $RECORD"
# nsupdate -k $TSIG_KEY <<EOF # nsupdate -k $TSIG_KEY <<EOF
# server $DNS_SERVER # server $DNS_SERVER
# zone $CURRENT_ZONE # zone $CURRENT_ZONE
# update delete $RECORD # update delete $RECORD
# send # send
# EOF # EOF
# elif [[ $line == +* ]]; then # Enregistrement ajouté elif [[ $line == +* ]]; then # Enregistrement ajouté
# RECORD=$(echo "$line" | sed 's/^+//') RECORD=$(echo "$line" | sed 's/^+//')
# echo "+ $RECORD" echo "+ $RECORD"
# nsupdate -k $TSIG_KEY <<EOF # nsupdate -k $TSIG_KEY <<EOF
# server $DNS_SERVER # server $DNS_SERVER
# zone $CURRENT_ZONE # zone $CURRENT_ZONE
# update add $RECORD # update add $RECORD
# send # send
# EOF # EOF
# fi fi
# ;; ;;
# esac esac
# done < zone_diff.txt done < zone_diff.txt