.forgejo/workflows/ci.yaml: fix error with domain
DNS automated deployment / deploy (push) Failing after 1s
Details
DNS automated deployment / deploy (push) Failing after 1s
Details
This commit is contained in:
parent
d3b148215b
commit
c2462770d0
|
@ -33,13 +33,13 @@ jobs:
|
||||||
"-"* | "+"*)
|
"-"* | "+"*)
|
||||||
if [ ! -z $CURRENT_ZONE ]; then
|
if [ ! -z $CURRENT_ZONE ]; then
|
||||||
if [[ $line == -* ]]; then # Enregistrement supprimé
|
if [[ $line == -* ]]; then # Enregistrement supprimé
|
||||||
RECORD=$(echo "$line" | sed 's/^-//' | sed 's/^\([^ ]\+\)\(\s\+\)\(IN\s\+\)\([^ ]\+\)\s.*/\1.a-lec.org.\2\3\4/')
|
RECORD=$(echo "$line" | sed 's/^-//' | sed "s/^\([^ ]\+\)\(\s\+\)\(IN\s\+\)\([^ ]\+\)\s.*/\1.${CURRENT_ZONE}.\2\3\4/")
|
||||||
echo "update delete $RECORD"
|
echo "update delete $RECORD"
|
||||||
echo -e "server ${{vars.DNS_SERVER}}\nupdate delete $RECORD\nsend" > temp_delete
|
echo -e "server ${{vars.DNS_SERVER}}\nupdate delete $RECORD\nsend" > temp_delete
|
||||||
nsupdate -k temp_keyfile temp_delete
|
nsupdate -k temp_keyfile temp_delete
|
||||||
rm temp_delete
|
rm temp_delete
|
||||||
elif [[ $line == +* ]]; then # Enregistrement ajouté
|
elif [[ $line == +* ]]; then # Enregistrement ajouté
|
||||||
RECORD=$(echo "$line" | sed 's/^+//' | sed 's/^\([^ ]\+\)\(\s\+\)\(IN\s\+\)\([^ ]\+\)\(\s\+\)/\1.a-lec.org.\2\3\4\5/')
|
RECORD=$(echo "$line" | sed 's/^+//' | sed 's/^\([^ ]\+\)\(\s\+\)\(IN\s\+\)\([^ ]\+\)\(\s\+\)/\1.{CURRENT_ZONE}.\2\3\4\5/')
|
||||||
echo "update add $RECORD"
|
echo "update add $RECORD"
|
||||||
echo -e "server ${{vars.DNS_SERVER}}\nttl 3600\nupdate add $RECORD\nsend" > temp_add
|
echo -e "server ${{vars.DNS_SERVER}}\nttl 3600\nupdate add $RECORD\nsend" > temp_add
|
||||||
nsupdate -k temp_keyfile temp_add
|
nsupdate -k temp_keyfile temp_add
|
||||||
|
|
Loading…
Reference in New Issue