{"id":29715149,"url":"https://github.com/friedinger/deletebranchcaches","last_synced_at":"2026-01-28T18:09:38.407Z","repository":{"id":297002699,"uuid":"995320865","full_name":"Friedinger/DeleteBranchCaches","owner":"Friedinger","description":"A GitHub Action to delete all caches associated with a specific branch reference in your repository.","archived":false,"fork":false,"pushed_at":"2025-07-20T22:15:32.000Z","size":405,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-21T00:14:16.335Z","etag":null,"topics":["action","cache","delete"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Friedinger.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-03T09:55:29.000Z","updated_at":"2025-07-20T22:15:36.000Z","dependencies_parsed_at":"2025-06-08T02:47:45.659Z","dependency_job_id":null,"html_url":"https://github.com/Friedinger/DeleteBranchCaches","commit_stats":null,"previous_names":["friedinger/deletebranchcaches"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Friedinger/DeleteBranchCaches","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Friedinger%2FDeleteBranchCaches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Friedinger%2FDeleteBranchCaches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Friedinger%2FDeleteBranchCaches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Friedinger%2FDeleteBranchCaches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Friedinger","download_url":"https://codeload.github.com/Friedinger/DeleteBranchCaches/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Friedinger%2FDeleteBranchCaches/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266796445,"owners_count":23985471,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["action","cache","delete"],"created_at":"2025-07-24T05:01:20.514Z","updated_at":"2026-01-28T18:09:38.402Z","avatar_url":"https://github.com/Friedinger.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Delete Branch Caches\n\n[![Release](https://img.shields.io/github/v/release/Friedinger/DeleteBranchCaches?style=flat-square\u0026color=blue)](https://github.com/Friedinger/DeleteBranchCaches/releases)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/Friedinger/DeleteBranchCaches/build-test.yml?style=flat-square\u0026label=Build%20and%20Test\u0026color=lime)](https://github.com/Friedinger/DeleteBranchCaches/actions/workflows/build-test.yml)\n[![Last Commit](https://img.shields.io/github/last-commit/Friedinger/DeleteBranchCaches?style=flat-square\u0026color=orange)](https://github.com/Friedinger/DeleteBranchCaches/commits/main)\n[![License: MIT](https://img.shields.io/github/license/Friedinger/DeleteBranchCaches?style=flat-square\u0026color=yellow)](LICENSE)\n\nA GitHub Action to delete all caches associated with a specific branch reference in your repository.\n\n## Features\n\n-   Deletes all GitHub Actions caches for a given branch (`ref`)\n-   Useful for cleaning up storage and avoiding stale caches\n\n## Usage\n\nAdd the following step to your workflow:\n\n```yaml\n- name: Delete branch caches\n  uses: Friedinger/DeleteBranchCaches@v2\n  with:\n      github-token: ${{ github.token }}\n      ref: ${{ github.ref }}\n```\n\n**Note:** Your workflow or job must include the following permissions:\n\n```yaml\npermissions:\n    actions: write\n```\n\nThis is required to allow the action to delete caches.\n\n## Inputs\n\n| Name            | Description                                                                                           | Required | Default               |\n| --------------- | ----------------------------------------------------------------------------------------------------- | -------- | --------------------- |\n| github-token    | GitHub token to use for authentication                                                                | true     | `${{ github.token }}` |\n| ref             | The branches ref to delete caches for (e.g. `refs/heads/main`), can be a single string or a yaml list | true     | `${{ github.ref }}`   |\n| fail-on-warning | Fail the action if a warning occurs during cache deletion                                             | false    | `false`               |\n\n#### Notes\n\n-   You can leave out both inputs to use the default values, which will delete caches for the current branch of the workflow.\n-   But it is recommended to always specify the `github-token` input for clarity and to avoid issues with permissions.\n\n### Input options for `ref`\n\nYou can provide the `ref` input in several ways, depending on your use case and YAML syntax. All of the following variants are supported:\n\n#### Single branch ref\n\n```yaml\nref: refs/heads/main\n```\n\n#### Multiple branch refs as YAML list\n\n```yaml\nref: |\n    refs/heads/branch-1\n    refs/heads/branch-2\n```\n\n#### Multiple branch refs as array in string\n\n```yaml\nref: \"['refs/heads/branch-1', 'refs/heads/branch-2']\"\n```\n\n#### Notes\n\n-   The action automatically detects the format and processes all variants correctly.\n-   For lists, the YAML list or array syntax is recommended for best readability.\n-   Sadly, directly passing an array like `ref: [refs/heads/branch-1, refs/heads/branch-2]` does not work due to GitHub only supporting strings for inputs.\n\n## Example Workflow\n\n```yaml\nname: Clean up caches\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  cleanup:\n    runs-on: ubuntu-latest\n\n  permissions:\n      actions: write\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Delete branch caches\n        uses: Friedinger/DeleteBranchCaches@v2\n        with:\n          github-token: ${{ github.token }}\n          ref: ${{ github.ref }}\n          fail-on-warning: true\n```\n\n## Development\n\nBuild the action:\n\n```sh\nnpm install\nnpm run build\n```\n\n## License\n\nMIT License © 2025 Friedinger\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriedinger%2Fdeletebranchcaches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffriedinger%2Fdeletebranchcaches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriedinger%2Fdeletebranchcaches/lists"}