.forgejo/workflows/ci.yaml: WIP
/ deploy_script (push) Successful in 1s Details

This commit is contained in:
Adrien Bourmault 2024-08-20 17:35:01 +02:00
parent bff49abf3d
commit a31ffb2f48
Signed by: neox
GPG Key ID: 57BC26A3687116F6
1 changed files with 24 additions and 18 deletions

View File

@ -10,6 +10,7 @@ jobs:
- name: Apply zone changes - name: Apply zone changes
shell: bash shell: bash
run: | run: |
CURRENT_ZONE=
echo "Preparing to update ${{ vars.DNS_SERVER }}..." echo "Preparing to update ${{ vars.DNS_SERVER }}..."
git clone ${{ gitea.server_url }}/${{ gitea.repository }} dns git clone ${{ gitea.server_url }}/${{ gitea.repository }} dns
cd dns cd dns
@ -20,9 +21,13 @@ jobs:
"--- "*".zone") "--- "*".zone")
CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //') CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //')
;; ;;
"--- "*)
CURRENT_ZONE=
;;
"+++"*) "+++"*)
;; ;;
"-"* | "+"*) "-"* | "+"*)
if [ ! -z CURRENT_ZONE ]; then
if [[ $line == -* ]]; then # Enregistrement supprimé if [[ $line == -* ]]; then # Enregistrement supprimé
RECORD=$(echo "$line" | sed 's/^-//') RECORD=$(echo "$line" | sed 's/^-//')
echo "- $RECORD" echo "- $RECORD"
@ -42,6 +47,7 @@ jobs:
# send # send
# EOF # EOF
fi fi
fi
;; ;;
esac esac
done < zone_diff.txt done < zone_diff.txt