workflows/deploy: Fix serial checks
Build and test / build (push) Successful in 1m4s
Build and test / test (push) Successful in 26s
Build and test / deploy (push) Successful in 22s

This commit is contained in:
2026-02-07 23:39:24 +01:00
parent 98e3e326e4
commit fb358410d5
+4 -4
View File
@@ -104,11 +104,11 @@ jobs:
fi
DATE="$(date "+%Y%m%d")"
if [[ "$SERIAL_OLD" == "$DATE*" ]]
if [[ "$SERIAL_OLD" -lt "${DATE}01" ]]
then
SERIAL_NEW="$((SERIAL+1))"
else
SERIAL_NEW="${DATE}01"
else
SERIAL_NEW="$((SERIAL_OLD+1))"
fi
echo "$SERIAL_NEW" > /tmp/serial_new
@@ -156,7 +156,7 @@ jobs:
- name: Verifying operation
run: |
SERIAL_ACTIVE="$(dig "@${{ vars.SSH_HOST }}" SOA pvv.ntnu.no | cut -d" " -f3)"
SERIAL_ACTIVE="$(dig +short "@${{ vars.SSH_HOST }}" SOA pvv.ntnu.no | cut -d" " -f3)"
if [[ "$(cat /tmp/serial_new)" == "$SERIAL_ACTIVE" ]]
then
echo "Update successful, server reports new active serial number '$SERIAL_ACTIVE'"