add podman
This commit is contained in:
parent
2bfd892131
commit
d01553ebfe
3 changed files with 61 additions and 0 deletions
|
|
@ -49,4 +49,38 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd = {
|
||||
services."forgejo-runner-container-updater" = {
|
||||
description = "Update forgejo runner container images";
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
set -uo pipefail
|
||||
failed=0
|
||||
images=(
|
||||
docker.io/library/debian:stable-slim
|
||||
docker.io/library/alpine:latest
|
||||
docker.io/moby/buildkit:latest
|
||||
)
|
||||
for image in "''${images[@]}"; do
|
||||
echo "Pulling $image..."
|
||||
if ! ${pkgs.podman}/bin/podman pull "$image"; then
|
||||
echo "Failed to pull $image"
|
||||
failed=1
|
||||
fi
|
||||
done
|
||||
exit $failed
|
||||
'';
|
||||
};
|
||||
timers."forgejo-runner-container-updater" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
RandomizedDelaySec = "30m";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue