This Actions can delete the Releases and Workflows runs history of a specified repository.
GPL-2.0 License
This Actions can delete specified repository's Releases and Workflow run logs.
这个 Actions 可以删除指定仓库的 Releases 和 Workflows 运行记录。
You can use this Actions by introducing it in the .github/workflows/*.yml
workflow script, such as in delete.yml.
在 .github/workflows/*.yml
工作流脚本中引入此 Actions 即可使用,例如 delete.yml。
- name: Delete releases and workflows runs
uses: ophub/delete-releases-workflows@main
with:
delete_releases: true
releases_keep_latest: 5
delete_workflows: true
workflows_keep_day: 10
gh_token: ${{ secrets.GITHUB_TOKEN }}
You can configure the deletion settings in the delete.yml file with the following options:
您可以在 delete.yml 文件中使用以下选项配置删除设置:
Key / 选项 | Required | Description / 说明 |
---|---|---|
delete_releases |
Required 必选项
|
Set whether to delete releases files (options: true /false ). The default is false .设置是否删除 releases 文件(选项:true /false ),默认为 false 。 |
prerelease_option | Optional可选项 | Set whether to differentiate pre-release versions (options: all /true /false ). all indicates all types, true /false represent only deleting releases files marked with this type. The default is all .设置是否区分预发行版本(选项:all /true /false )。all 表示全部类型,true /false 代表仅删除标记为此类型的 releases 文件。默认为 all 。 |
releases_keep_latest | Optional可选项 | Set how many of the latest Releases versions to keep (integer , such as: 5). Setting to 0 means delete all, and the default is to keep 90 .设置保留几个最新的 Releases 版本(整数 。如:5),设置为 0 表示全部删除,默认保留 90 个。 |
releases_keep_keyword | Optional可选项 | Set the keywords of the Releases' tags to be preserved. Multiple keywords are separated by / (for example: book/tool ). The default value is none .设置需要保留的 Releases 的 tags 关键字 ,多个关键字使用 / 分割(例如:book/tool ),默认值 无 。 |
delete_tags | Optional可选项 | Set whether to delete the tags associated with Releases (options: true /false ). The default is false .设置是否删除与 Releases 关联的 tags(选项:true /false ),默认为 false 。 |
delete_workflows |
Required 必选项
|
Set whether to delete workflow run logs (options: true /false ). The default is false .设置是否删除 workflows 运行记录(选项:true /false ),默认为 false 。 |
workflows_keep_day | Optional可选项 | Set how many days' workflow logs to keep (integer , such as: 30). Setting to 0 means delete all. The default is 90 days.设置保留几天以内的 workflows 记录(整数 。如:30),设置为 0 表示全部删除。默认为 90 天。 |
workflows_keep_keyword | Optional可选项 | Set the keywords for the names of the workflow run logs to be kept. Multiple keywords are separated by / (for example: book/tool ). The default value is none .设置需要保留的 workflows 运行记录的名称关键字 ,多个关键字使用 / 分割(例如:book/tool ),默认值 无 。 |
out_log | Optional可选项 | Set whether to output detailed json logs (options: true /false ). The default value is false .设置是否输出详细的 json 日志(选项:true /false ),默认值 false 。 |
repo | Optional可选项 | Set the <owner>/<repo> for the execution operation, the default is the current repository .设置执行操作的 <owner>/<repo> ,默认为当前仓库 。 |
gh_token |
Required 必选项
|
Set the GITHUB_TOKEN password for executing the delete operation.设置执行删除操作的 GITHUB_TOKEN 口令。 |
The delete-releases-workflows © OPHUB is licensed under GPL-2.0