Skip to content

Commit f460da0

Browse files
committed
fix(ci): use the supported closed-PR cache cleanup trigger
1 parent c78715f commit f460da0

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎.github/CI.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Database integration uses 4-vCPU Blacksmith runners with sticky dependency disks
3030

3131
GitHub runners install dependencies directly rather than transferring Bun and `node_modules` archives. In a same-source paired comparison, those restores took 26.2 seconds before an 82-millisecond install, while a clean install took 12.42 seconds. This is one paired observation; retain the policy only while repeated CI timings support it. Blacksmith keeps its sticky dependency disks. GitHub Turbo output caches remain enabled for jobs that request them, with a commit-specific key and a task/event/fork-scoped restore prefix, so a rerun can reuse an exact entry without creating another archive. Push jobs never restore pull-request entries.
3232

33-
Closing a pull request deletes only its GitHub merge-ref caches. The cleanup runs the base branch's workflow without checking out PR code; it never selects a branch-wide or default-branch cache. Blacksmith sticky disks retain their separate lifecycle.
33+
Closing a same-repository pull request deletes only its GitHub merge-ref caches after verifying that it remains closed or merged. The regular `pull_request` workflow skips forks and Dependabot because their tokens cannot delete caches; those entries retain GitHub's normal cache eviction. Cleanup checks out no code and never selects a branch-wide or default-branch cache. Blacksmith sticky disks retain their separate lifecycle.
3434

3535
Memory-heavy builds and browser jobs retain appropriately sized Blacksmith runners. Electron uses 4-vCPU Blacksmith: both shards passed within 14 seconds of the 8-vCPU control; the free GitHub rest shard was slower and its lease run stalled.
3636

‎.github/workflows/cache-cleanup.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: cache cleanup
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
types: [closed]
66

77
permissions:
@@ -13,6 +13,10 @@ concurrency:
1313

1414
jobs:
1515
cleanup:
16+
if: >-
17+
github.event.pull_request.head.repo.full_name == github.repository
18+
&& github.event.pull_request.user.login != 'dependabot[bot]'
19+
&& github.actor != 'dependabot[bot]'
1620
runs-on: ubuntu-24.04
1721
timeout-minutes: 5
1822
permissions:

0 commit comments

Comments
 (0)