build/rebuild.sh: rebuild when current image has pending updates
This commit is contained in:
parent
aec33942bb
commit
7d6169a8a0
5 changed files with 41 additions and 0 deletions
18
build/rebuild.sh
Executable file
18
build/rebuild.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
updates_available () {
|
||||
docker pull $1
|
||||
if test "$(docker run -it --rm $1 /bin/sh -c 'apt -qqq update && apt -qq list --upgradable')" != ""; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
if updates_available pommib/powerdns:4.4-bullseye; then
|
||||
./debian/11/build.sh
|
||||
fi
|
||||
|
||||
if updates_available pommib/powerdns:4.6-bookworm; then
|
||||
./debian/12/build.sh
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue