Update clean_old_workflows.yml

This commit is contained in:
Hamza417
2024-03-09 15:42:53 +05:30
parent 6202918216
commit 115ff24b61
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,8 @@ name: Cleanup Old Workflows
on:
schedule:
- cron: '0 0 * * *' # Run daily at 00:00
# Run weekly on Sunday at 00:00
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:

View File

@ -32,7 +32,7 @@ def delete_workflow_run(run_id, token):
def main(token):
old_date = datetime.now() - timedelta(days=0)
old_date = datetime.now() - timedelta(days=14)
next_url = f"https://api.github.com/repos/Hamza417/Inure/actions/runs"
while next_url: