deploy/gitbay-runner-prune.service
13 lines · 530 bytes
1# Paired with gitbay-runner-prune.timer. Runs as the runner's own user,
2# because rootless podman's store belongs to that user and root's prune
3# would not see it.
4[Unit]
5Description=Prune unused podman images on the CI runner
6
7[Service]
8Type=oneshot
9User=ci-runner
10# Images not used by a container and older than a week. A build that
11# names an image again re-pulls it; the cost is one pull, not a failure.
12ExecStart=/usr/bin/podman image prune --all --force --filter until=168h
13ExecStart=/usr/bin/podman container prune --force