.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
77e8d9e19f
commit
181dcc78af
|
@ -8,37 +8,40 @@ jobs:
|
||||||
runs-on: linux_amd64
|
runs-on: linux_amd64
|
||||||
steps:
|
steps:
|
||||||
- name: Apply zone changes
|
- name: Apply zone changes
|
||||||
|
uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Preparing to update ${{ vars.DNS_SERVER }}..."
|
echo "Preparing to update ${{ vars.DNS_SERVER }}..."
|
||||||
git diff HEAD^ HEAD > zone_diff.txt
|
echo $(git diff HEAD^ HEAD)
|
||||||
while IFS= read -r line; do
|
echo $(git diff HEAD)
|
||||||
case "$line" in
|
# git diff HEAD^ HEAD > zone_diff.txt
|
||||||
"--- "*".zone")
|
# while IFS= read -r line; do
|
||||||
CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //')
|
# case "$line" in
|
||||||
;;
|
# "--- "*".zone")
|
||||||
"+++"*)
|
# CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //')
|
||||||
;;
|
# ;;
|
||||||
"-"* | "+"*)
|
# "+++"*)
|
||||||
if [[ $line == -* ]]; then # Enregistrement supprimé
|
# ;;
|
||||||
RECORD=$(echo "$line" | sed 's/^-//')
|
# "-"* | "+"*)
|
||||||
echo "- $RECORD"
|
# if [[ $line == -* ]]; then # Enregistrement supprimé
|
||||||
|
# RECORD=$(echo "$line" | sed 's/^-//')
|
||||||
|
# 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
|
Loading…
Reference in New Issue