• Will Chen's avatar
    ci: add nightly disk cleanup for self-hosted runner ci1 (#2620) · ea61dc53
    Will Chen 提交于
    Adds a scheduled GitHub Actions workflow that safely frees disk space on
    self-hosted macOS runner `ci1` at 4:00 AM PST to prevent CI from running
    out of space.
    
    ## Changes
    - **New workflow** `.github/workflows/nightly-runner-cleanup.yml`: Runs
    daily at 4 AM PST; only executes on runner `ci1`
    - **Extended cleanup script** `scripts/ci-cleanup-macos.sh`:
    `CI_NIGHTLY_CLEANUP=1` enables host-level cleanup:
      - `~/Library/Caches` subdirs (Homebrew, Xcode, LLVM)
      - npm cache
      - Runner `_work` dirs older than 2 days
    - **Documentation** in workflows README with validation steps
    
    ## Safety
    - Only allowlisted paths are deleted
    - Never removes runner binaries, config, or user data
    - Manual run via `workflow_dispatch` for testing
    
    Made with [Cursor](https://cursor.com)
    <!-- devin-review-badge-begin -->
    
    ---
    
    <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2620"
    target="_blank">
      <picture>
    <source media="(prefers-color-scheme: dark)"
    srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
    <img
    src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
    alt="Open with Devin">
      </picture>
    </a>
    <!-- devin-review-badge-end -->
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Medium Risk**
    > Primarily CI automation changes, but it introduces scheduled `rm -rf`
    cleanup on a self-hosted runner; an allowlist/guard is present, yet
    mistakes could still delete useful caches or workspaces and disrupt
    builds.
    > 
    > **Overview**
    > Adds a scheduled `Nightly Runner Cleanup` GitHub Actions workflow that
    runs daily (and via `workflow_dispatch`) on self-hosted macOS runners,
    guarded to execute only when `RUNNER_NAME` is `ci1`.
    > 
    > Extends `scripts/ci-cleanup-macos.sh` with a `CI_NIGHTLY_CLEANUP=1`
    mode that additionally purges allowlisted `~/Library/Caches`
    subdirectories and removes stale runner `actions-runner/_work`
    directories older than 2 days, and updates the workflows README with the
    new workflow and manual validation steps.
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    0b108a8a7969060614311f54cd694f0454a6839b. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    <!-- This is an auto-generated description by cubic. -->
    ---
    ## Summary by cubic
    Adds a nightly GitHub Actions workflow to free disk on self-hosted macOS
    runner ci1 at 4:00 AM PST. Extends the cleanup script with a guarded
    nightly mode to remove allowlisted caches and stale work dirs so CI
    doesn’t run out of space.
    
    - **New Features**
    - Added nightly-runner-cleanup.yml: runs daily at 4 AM PST; only
    executes on runner ci1; supports manual workflow_dispatch.
    - Updated scripts/ci-cleanup-macos.sh: CI_NIGHTLY_CLEANUP=1 cleans
    Library/Caches subdirs (Homebrew, Xcode, org.llvm.clang*), npm cache,
    Playwright browsers, and runner _work dirs older than 2 days; prints
    mode and disk before/after.
      - Updated README with manual validation steps.
    
    <sup>Written for commit 0b108a8a7969060614311f54cd694f0454a6839b.
    Summary will update on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    
    ---------
    Co-authored-by: 's avatarCursor <cursoragent@cursor.com>
    Co-authored-by: 's avatardevin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
    ea61dc53
名称
最后提交
最后更新
.claude 正在载入提交数据...
.cursor/rules 正在载入提交数据...
.devcontainer 正在载入提交数据...
.github 正在载入提交数据...
.husky 正在载入提交数据...
.storybook 正在载入提交数据...
assets 正在载入提交数据...
docs 正在载入提交数据...
drizzle 正在载入提交数据...
e2e-tests 正在载入提交数据...
makers 正在载入提交数据...
packages/@dyad-sh 正在载入提交数据...
rules 正在载入提交数据...
scaffold 正在载入提交数据...
scripts 正在载入提交数据...
shared 正在载入提交数据...
src 正在载入提交数据...
testing 正在载入提交数据...
tools 正在载入提交数据...
worker 正在载入提交数据...
workers/tsc 正在载入提交数据...
.cursorignore 正在载入提交数据...
.env.example 正在载入提交数据...
.eslintrc.json 正在载入提交数据...
.gitattributes 正在载入提交数据...
.gitignore 正在载入提交数据...
.npmrc 正在载入提交数据...
.oxfmtrc.json 正在载入提交数据...
.oxlintrc.json 正在载入提交数据...
.prettierignore 正在载入提交数据...
.prettierrc 正在载入提交数据...
AGENTS.md 正在载入提交数据...
CLA.md 正在载入提交数据...
CLAUDE.md 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
LICENSE 正在载入提交数据...
README.md 正在载入提交数据...
SECURITY.md 正在载入提交数据...
biome.json 正在载入提交数据...
components.json 正在载入提交数据...
drizzle.config.ts 正在载入提交数据...
forge.config.ts 正在载入提交数据...
forge.env.d.ts 正在载入提交数据...
index.html 正在载入提交数据...
lint-staged.config.js 正在载入提交数据...
merge.config.ts 正在载入提交数据...
package-lock.json 正在载入提交数据...
package.json 正在载入提交数据...
playwright.config.ts 正在载入提交数据...
tsconfig.app.json 正在载入提交数据...
tsconfig.json 正在载入提交数据...
tsconfig.node.json 正在载入提交数据...
vite.main.config.mts 正在载入提交数据...
vite.preload.config.mts 正在载入提交数据...
vite.renderer.config.mts 正在载入提交数据...
vite.worker.config.mts 正在载入提交数据...
vitest.config.ts 正在载入提交数据...
windowsSign.ts 正在载入提交数据...