{"id":17330098,"url":"https://github.com/ophub/delete-releases-workflows","last_synced_at":"2026-05-17T04:05:12.010Z","repository":{"id":103647560,"uuid":"586493256","full_name":"ophub/delete-releases-workflows","owner":"ophub","description":"This Actions can delete the Releases and Workflows runs history of a specified repository.","archived":false,"fork":false,"pushed_at":"2025-04-01T11:43:46.000Z","size":39,"stargazers_count":11,"open_issues_count":0,"forks_count":12,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T02:49:07.577Z","etag":null,"topics":["actions","delete","releases","workflows"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ophub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-01-08T10:50:40.000Z","updated_at":"2025-04-01T11:43:50.000Z","dependencies_parsed_at":"2023-06-15T01:30:26.335Z","dependency_job_id":"64d3a5d4-1c77-4707-b990-8bfbc60389c7","html_url":"https://github.com/ophub/delete-releases-workflows","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ophub%2Fdelete-releases-workflows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ophub%2Fdelete-releases-workflows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ophub%2Fdelete-releases-workflows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ophub%2Fdelete-releases-workflows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ophub","download_url":"https://codeload.github.com/ophub/delete-releases-workflows/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248931614,"owners_count":21185212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","delete","releases","workflows"],"created_at":"2024-10-15T14:50:20.253Z","updated_at":"2026-05-17T04:05:11.991Z","avatar_url":"https://github.com/ophub.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Function Description / 功能说明\n\nThis Action can delete Releases and Workflow run logs of a specified repository.\n\n此 Action 可删除指定仓库的 Releases 和 Workflow 运行记录。\n\n## Instructions / 使用说明\n\nYou can use this Action by referencing it in a `.github/workflows/*.yml` workflow script, as shown in [delete.yml](https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/.github/workflows/delete-older-releases-workflows.yml).\n\n在 `.github/workflows/*.yml` 工作流脚本中引用此 Action 即可使用，示例参见 [delete.yml](https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/.github/workflows/delete-older-releases-workflows.yml)。\n\n```yaml\n- name: Delete releases and workflows runs\n  uses: ophub/delete-releases-workflows@main\n  with:\n    delete_releases: true\n    releases_keep_latest: 5\n    delete_workflows: true\n    workflows_keep_day: 10\n    gh_token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## Configuration / 配置说明\n\nThe following options can be configured in the delete.yml file:\n\n可在 delete.yml 文件中配置以下选项：\n\n| Key / 选项               | Required   | Description / 说明                       |\n| ----------------------- | ---------- | ---------------------------------------- |\n| delete_releases         | `Required`\u003cbr /\u003e`必选项` | Whether to delete Releases (options: `true`/`false`). Default: `false`.\u003cbr /\u003e是否删除 Releases（选项：`true`/`false`），默认为 `false`。 |\n| prerelease_option       | Optional\u003cbr /\u003e可选项 | Filter the scope of Releases by pre-release status (options: `all`/`true`/`false`). `all` processes all Releases; `true` processes only pre-releases; `false` processes only non-pre-releases. Keyword and retention filters are applied within the filtered scope. Default: `all`.\u003cbr /\u003e按预发布状态筛选待处理的 Releases 范围（选项：`all`/`true`/`false`）。`all` 处理所有 Releases；`true` 仅处理预发布版本；`false` 仅处理正式版本。关键字和保留数量的过滤将在此筛选范围内执行。默认为 `all`。 |\n| releases_keep_keyword   | Optional\u003cbr /\u003e可选项   | Keywords to match in Release tag names for preservation. Releases whose tag contains any keyword will ALL be preserved. Separate multiple keywords with `/` (e.g. `book/tool`). Default: none.\u003cbr /\u003e需要保留的 Release 标签（Tag）名称中的关键字，标签名包含任一关键字的 Release 将被全部保留。多个关键字以 `/` 分隔（例如：`book/tool`）。默认值：无。 |\n| releases_keep_latest    | Optional\u003cbr /\u003e可选项 | Among Releases not matching any keyword, number of latest ones to keep (integer, e.g. `5`). Set to `0` to delete all non-keyword-matched Releases. Default: `90`.\u003cbr /\u003e在不包含关键字的 Releases 中，保留最新的数量（整数，如 `5`）。设置为 `0` 表示全部删除不含关键字的 Releases，默认保留 `90` 个。 |\n| delete_tags             | Optional\u003cbr /\u003e可选项   | Whether to also delete tags associated with the deleted Releases (options: `true`/`false`). Default: `false`.\u003cbr /\u003e是否同时删除被删除的 Releases 所关联的标签（选项：`true`/`false`），默认为 `false`。 |\n| delete_workflows        | `Required`\u003cbr /\u003e`必选项` | Whether to delete Workflow run records (options: `true`/`false`). Only completed runs are processed. Default: `false`.\u003cbr /\u003e是否删除 Workflow 运行记录（选项：`true`/`false`）。仅处理已完成（completed）的运行记录。默认为 `false`。 |\n| workflows_keep_keyword  | Optional\u003cbr /\u003e可选项   | Keywords to match in Workflow run names for preservation. Workflow runs whose name contains any keyword will ALL be preserved. Separate multiple keywords with `/` (e.g. `book/tool`). Default: none.\u003cbr /\u003e需要保留的 Workflow 运行记录名称中的关键字，名称包含任一关键字的运行记录将被全部保留。多个关键字以 `/` 分隔（例如：`book/tool`）。默认值：无。 |\n| workflows_keep_day      | Optional\u003cbr /\u003e可选项 | Among Workflow runs not matching any keyword, number of days to retain (integer, e.g. `30`). Set to `0` to delete all non-keyword-matched runs. Default: `90` days.\u003cbr /\u003e在不包含关键字的 Workflow 运行记录中，保留最近几天的记录（整数，如 `30`）。设置为 `0` 表示全部删除不含关键字的运行记录，默认为 `90` 天。 |\n| out_log                 | Optional\u003cbr /\u003e可选项   | Whether to output detailed JSON logs for each step (options: `true`/`false`). Default: `false`.\u003cbr /\u003e是否输出每个步骤的详细 JSON 日志（选项：`true`/`false`），默认为 `false`。 |\n| repo                    | Optional\u003cbr /\u003e可选项   | Target repository in `\u003cowner\u003e/\u003crepo\u003e` format. Default: the current repository.\u003cbr /\u003e目标仓库，格式为 `\u003cowner\u003e/\u003crepo\u003e`。默认为当前仓库。 |\n| gh_token                | `Required`\u003cbr /\u003e`必选项` | [GITHUB_TOKEN](https://docs.github.com/en/actions/security-guides/automatic-token-authentication) used to authenticate the delete operations.\u003cbr /\u003e用于验证删除操作的 [GITHUB_TOKEN](https://docs.github.com/zh/actions/security-guides/automatic-token-authentication#about-the-github_token-secret)。 |\n\n- Each run can fetch up to 10,000 Releases and 10,000 Workflow run records (100 per page × 100 pages). If more records exist, run the action multiple times.\n- 每次运行最多可获取 10,000 个 Releases 和 10,000 条 Workflow 运行记录（每页 100 条 × 最多 100 页）。如果记录数超出上限，需多次执行该操作。\n\n## Links / 链接\n\n- [GitHub Docs](https://docs.github.com/en/rest/releases/releases?list-releases)\n- [unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit)\n- [amlogic-s9xxx-armbian](https://github.com/ophub/amlogic-s9xxx-armbian)\n- [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt)\n- [flippy-openwrt-actions](https://github.com/ophub/flippy-openwrt-actions)\n- [upload-to-releases](https://github.com/ophub/upload-to-releases)\n\n## License / 许可协议\n\ndelete-releases-workflows © OPHUB is licensed under [GPL-2.0](https://github.com/ophub/delete-releases-workflows/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fophub%2Fdelete-releases-workflows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fophub%2Fdelete-releases-workflows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fophub%2Fdelete-releases-workflows/lists"}