Dec 19

Gitea cleanup 不指定

felix021 @ 2025-12-19 22:37 [IT » 软件] 评论(0) , 引用(0) , 阅读(162) | Via 本站原创 | |
Gitea does not provide official way to cleanup action running history.


Had to do it manually by


#!/bin/bash

mysql giteadb -e "delete from action where created_unix < UNIX_TIMESTAMP(date_sub(now(), interval 45 day))"
mysql giteadb -e "delete from action_run where created < UNIX_TIMESTAMP(date_sub(now(), interval 45 day))"
mysql giteadb -e "delete from action_task where created < UNIX_TIMESTAMP(date_sub(now(), interval 45 day))"
mysql giteadb -e "delete from action_run_job where created < UNIX_TIMESTAMP(date_sub(now(), interval 45 day))"
mysql giteadb -e "delete from action_task_step where created < UNIX_TIMESTAMP(date_sub(now(), interval 45 day))"

find /home/gitea/.cache/act -maxdepth 1 -ctime +45 | xargs rm -rf




欢迎扫码关注:




转载请注明出自 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   *非必须
网址   电邮   [注册]