.forgejo/workflows/ci.yaml: WIP
/ deploy_script (push) Successful in 1s
Details
/ deploy_script (push) Successful in 1s
Details
This commit is contained in:
parent
bff49abf3d
commit
a31ffb2f48
|
@ -10,6 +10,7 @@ jobs:
|
|||
- name: Apply zone changes
|
||||
shell: bash
|
||||
run: |
|
||||
CURRENT_ZONE=
|
||||
echo "Preparing to update ${{ vars.DNS_SERVER }}..."
|
||||
git clone ${{ gitea.server_url }}/${{ gitea.repository }} dns
|
||||
cd dns
|
||||
|
@ -20,27 +21,32 @@ jobs:
|
|||
"--- "*".zone")
|
||||
CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //')
|
||||
;;
|
||||
"--- "*)
|
||||
CURRENT_ZONE=
|
||||
;;
|
||||
"+++"*)
|
||||
;;
|
||||
"-"* | "+"*)
|
||||
if [[ $line == -* ]]; then # Enregistrement supprimé
|
||||
RECORD=$(echo "$line" | sed 's/^-//')
|
||||
echo "- $RECORD"
|
||||
# nsupdate -k $TSIG_KEY <<EOF
|
||||
# server $DNS_SERVER
|
||||
# zone $CURRENT_ZONE
|
||||
# update delete $RECORD
|
||||
# send
|
||||
# EOF
|
||||
elif [[ $line == +* ]]; then # Enregistrement ajouté
|
||||
RECORD=$(echo "$line" | sed 's/^+//')
|
||||
echo "+ $RECORD"
|
||||
# nsupdate -k $TSIG_KEY <<EOF
|
||||
# server $DNS_SERVER
|
||||
# zone $CURRENT_ZONE
|
||||
# update add $RECORD
|
||||
# send
|
||||
# EOF
|
||||
if [ ! -z CURRENT_ZONE ]; then
|
||||
if [[ $line == -* ]]; then # Enregistrement supprimé
|
||||
RECORD=$(echo "$line" | sed 's/^-//')
|
||||
echo "- $RECORD"
|
||||
# nsupdate -k $TSIG_KEY <<EOF
|
||||
# server $DNS_SERVER
|
||||
# zone $CURRENT_ZONE
|
||||
# update delete $RECORD
|
||||
# send
|
||||
# EOF
|
||||
elif [[ $line == +* ]]; then # Enregistrement ajouté
|
||||
RECORD=$(echo "$line" | sed 's/^+//')
|
||||
echo "+ $RECORD"
|
||||
# nsupdate -k $TSIG_KEY <<EOF
|
||||
# server $DNS_SERVER
|
||||
# zone $CURRENT_ZONE
|
||||
# update add $RECORD
|
||||
# send
|
||||
# EOF
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue