searxng/diff.sh
ange 902929345d
All checks were successful
/ deploy (push) Successful in 7s
bump: 2025.5.2-590b21165
2025-05-03 04:36:14 +00:00

18 lines
496 B
Bash
Executable File

#!/bin/bash -e
. ./.env
DOCKER_API='https://hub.docker.com/v2/namespaces/searxng/repositories/searxng'
REPO='https://github.com/searxng/searxng'
tmp="$(mktemp)"
new_tag="$(curl -L "$DOCKER_API/tags" | jq -r '.results[2].name')"
new_commit="$(grep -Eo '\w+$' <<< "$new_tag")"
if curl -Lo "$tmp" "$REPO/raw/$new_commit/searx/settings.yml" && ! diff -Z "$tmp" "config/settings.yml" > /dev/null; then
$EDITOR -d -- "config/settings.yml" "$tmp"
fi
sed -i "/^IMAGEAPP=/s/:.*/:$new_tag/" .env