From 181dcc78afd1102be65568cbe1a20111fe6b3c46 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Tue, 20 Aug 2024 17:19:18 +0200 Subject: [PATCH] .forgejo/workflows/ci.yaml: WIP --- .forgejo/workflows/ci.yaml | 41 ++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index eb8f61d..76e77ca 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -8,37 +8,40 @@ jobs: runs-on: linux_amd64 steps: - name: Apply zone changes + uses: https://code.forgejo.org/actions/checkout@v4 shell: bash run: | echo "Preparing to update ${{ vars.DNS_SERVER }}..." - git diff HEAD^ HEAD > zone_diff.txt - while IFS= read -r line; do - case "$line" in - "--- "*".zone") - CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //') - ;; - "+++"*) - ;; - "-"* | "+"*) - if [[ $line == -* ]]; then # Enregistrement supprimé - RECORD=$(echo "$line" | sed 's/^-//') - echo "- $RECORD" + echo $(git diff HEAD^ HEAD) + echo $(git diff HEAD) + # git diff HEAD^ HEAD > zone_diff.txt + # while IFS= read -r line; do + # case "$line" in + # "--- "*".zone") + # CURRENT_ZONE=$(basename "$line" .zone | sed 's/--- //') + # ;; + # "+++"*) + # ;; + # "-"* | "+"*) + # if [[ $line == -* ]]; then # Enregistrement supprimé + # RECORD=$(echo "$line" | sed 's/^-//') + # echo "- $RECORD" # nsupdate -k $TSIG_KEY <