.forgejo/workflows/ci.yaml: WIP
/ deploy_script (push) Failing after 1s
Details
/ deploy_script (push) Failing after 1s
Details
This commit is contained in:
parent
b12671fc3e
commit
77e8d9e19f
|
@ -11,36 +11,34 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Preparing to update ${{ vars.DNS_SERVER }}..."
|
echo "Preparing to update ${{ vars.DNS_SERVER }}..."
|
||||||
echo "Finished."
|
git diff HEAD^ HEAD > zone_diff.txt
|
||||||
|
while IFS= read -r line; do
|
||||||
# run: git diff HEAD^ HEAD > zone_diff.txt
|
case "$line" in
|
||||||
# while IFS= read -r line; do
|
"--- "*".zone")
|
||||||
# case "$line" in
|
CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //')
|
||||||
# "--- "*".zone")
|
;;
|
||||||
# CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //')
|
"+++"*)
|
||||||
# ;;
|
;;
|
||||||
# "+++"*)
|
"-"* | "+"*)
|
||||||
# ;;
|
if [[ $line == -* ]]; then # Enregistrement supprimé
|
||||||
# "-"* | "+"*)
|
RECORD=$(echo "$line" | sed 's/^-//')
|
||||||
# if [[ $line == -* ]]; then # Enregistrement supprimé
|
echo "- $RECORD"
|
||||||
# RECORD=$(echo "$line" | sed 's/^-//')
|
# nsupdate -k $TSIG_KEY <<EOF
|
||||||
# echo - $RECORD
|
# server $DNS_SERVER
|
||||||
# echo nsupdate -k $TSIG_KEY <<EOF
|
# zone $CURRENT_ZONE
|
||||||
# server $DNS_SERVER
|
# update delete $RECORD
|
||||||
# zone $CURRENT_ZONE
|
# send
|
||||||
# update delete $RECORD
|
# EOF
|
||||||
# send
|
elif [[ $line == +* ]]; then # Enregistrement ajouté
|
||||||
# EOF
|
RECORD=$(echo "$line" | sed 's/^+//')
|
||||||
# elif [[ $line == +* ]]; then # Enregistrement ajouté
|
echo "+ $RECORD"
|
||||||
# RECORD=$(echo "$line" | sed 's/^+//')
|
# nsupdate -k $TSIG_KEY <<EOF
|
||||||
# echo + $RECORD
|
# server $DNS_SERVER
|
||||||
# nsupdate -k $TSIG_KEY <<EOF
|
# zone $CURRENT_ZONE
|
||||||
# server $DNS_SERVER
|
# update add $RECORD
|
||||||
# zone $CURRENT_ZONE
|
# send
|
||||||
# update add $RECORD
|
# EOF
|
||||||
# send
|
fi
|
||||||
# EOF
|
;;
|
||||||
# fi
|
esac
|
||||||
# ;;
|
done < zone_diff.txt
|
||||||
# esac
|
|
||||||
# done < zone_diff.txt
|
|
Loading…
Reference in New Issue