Purge a pull request's Actions caches when it closes
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github, github-actions
- Lĩnh vực
- ci-cd
Hướng nghiên cứu
Bắt đầu với cấu hình workflow GitHub Actions của repository và các endpoint cache đã được ghi chép: GET /repos/{owner}/{repo}/actions/caches và DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}. Xác minh rằng workflow xử lý sự kiện pull_request closed, sử dụng GITHUB_TOKEN với actions: write, chỉ xóa các cache refs/pull//merge khớp và thành công khi không có cache nào tồn tại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Actions caches created for a pull request are never deleted when that pull request closes. On 2026-08-19 this repository held 15 caches of about 209 MB each, roughly 3.1 GB. Every one of them belonged to a pull request that was already merged or closed, and all 15 shared the same cache key. Each repository on the Free plan gets 10 GB of cache. Filling it wastes the allowance and produces billing alert emails for the organisation.
Outcome
When a pull request closes, the caches that belong only to that pull request are deleted automatically. No manual cleanup is needed.
Acceptance criteria
- A workflow runs on
pull_requestwithtypes: [closed]. - It deletes every cache whose
refisrefs/pull/<number>/mergefor the pull request that just closed. - It uses the built-in
GITHUB_TOKENwithpermissions: actions: write, not a personal access token. - The run succeeds when the pull request has no caches.
- Caches on branch refs such as
refs/heads/mainandrefs/heads/developare not touched.
Notes
- The 15 caches were deleted by hand on 2026-08-19.
- Because all 15 shared one cache key, each pull request stored a full copy of the same content. Worth checking whether the cache key needs to include the pull request ref at all.
- List caches with
GET /repos/{owner}/{repo}/actions/caches, delete withDELETE /repos/{owner}/{repo}/actions/caches/{cache_id}.
- Ngôn ngữ chính
- C#
- Star
- 0
- Fork
- 0
- Merge trung bình
- 8 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Fallout-build/Fallout.Extensions.VSCode
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
blocked enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Fallout-build/Fallout.Extensions.VSCode#1 · 1 bình luận ·
Tất cả issue của Fallout-build/Fallout.Extensions.VSCode
Issue tương tự
-
Money ExploitsĐang mởS: Untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
project-wayfarer/wayfarer-14#1628 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
:watch: Not Triaged dotnet-target-version
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
copilot documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày
-
untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
dotnet/dotnet-api-docs#13124 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày