English |
简体中文
A script and workflow for automating the cleanup of GitHub Actions workflow run records, supporting batch deletion across multiple repositories.
- Supports manual triggers and scheduled tasks: You can manually trigger the workflow or set up a schedule for automatic execution.
- Supports multiple repositories: By configuring environment variables, you can clean up workflow run records for multiple repositories at once.
- Easy to use: Requires minimal configuration with no complex setup.
The following environment variables need to be set in GitHub Secrets:
Variable Name | Description |
---|---|
DELETE_WORKFLOW_RUNS |
GitHub Personal Access Token with repo and workflow permissions. |
REPO_OWNER |
Repository owner username (typically your GitHub username or org name). |
REPO_NAME |
Names of repositories to clean up, separated by commas (e.g., repoa,repob,repoccc ). |
The schedule
in the workflow uses a cron expression for configuration. By default, it is set to run daily at midnight (UTC time).
on:
schedule:
- cron: "0 0 * * *" # Executes daily at 00:00 UTC