.forgejo/workflows/ci.yaml: correcting error
/ deploy_script (push) Successful in 2s
Details
/ deploy_script (push) Successful in 2s
Details
This commit is contained in:
parent
ded4e7c889
commit
24ce431ae0
|
@ -15,6 +15,7 @@ jobs:
|
||||||
git clone ${{ gitea.server_url }}/${{ gitea.repository }} dns
|
git clone ${{ gitea.server_url }}/${{ gitea.repository }} dns
|
||||||
cd dns
|
cd dns
|
||||||
git diff HEAD^ HEAD > zone_diff.txt
|
git diff HEAD^ HEAD > zone_diff.txt
|
||||||
|
echo "${{ secrets.TSIG_KEY }}" > temp_keyfile
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
case "$line" in
|
case "$line" in
|
||||||
"--- "*".zone")
|
"--- "*".zone")
|
||||||
|
@ -33,16 +34,17 @@ jobs:
|
||||||
RECORD=$(echo "$line" | sed 's/^-//')
|
RECORD=$(echo "$line" | sed 's/^-//')
|
||||||
echo "update delete $RECORD"
|
echo "update delete $RECORD"
|
||||||
echo -e "server $DNS_SERVER\nupdate delete $RECORD\nsend" > temp_delete
|
echo -e "server $DNS_SERVER\nupdate delete $RECORD\nsend" > temp_delete
|
||||||
nsupdate -k "${{ secrets.TSIG_KEY }}" 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/^+//')
|
RECORD=$(echo "$line" | sed 's/^+//')
|
||||||
echo "+ $RECORD"
|
echo "+ $RECORD"
|
||||||
echo -e "server $DNS_SERVER\nupdate add $RECORD\nsend" > temp_add
|
echo -e "server $DNS_SERVER\nupdate add $RECORD\nsend" > temp_add
|
||||||
nsupdate -k "${{ secrets.TSIG_KEY }}" temp_add
|
nsupdate -k temp_keyfile temp_add
|
||||||
rm temp_add
|
rm temp_add
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done < zone_diff.txt
|
done < zone_diff.txt
|
||||||
|
rm temp_keyfile
|
Loading…
Reference in New Issue