@gigara/rush-github-action-build-cache-plugin

中文文档
1.1.8发布于 2026/02/18Apache-2.0CommonJS近 30 天下载 7020

Rush build-cache plugin for Github Actions

原始使用文档
文档目录5 节
  1. Prerequisite
  2. Installation
  3. Usage
  4. Contributing
  5. License

rush-github-action-build-cache-plugin

Rush build-cache plugin for GitHub Actions. This plugin will automatically save and restore the build cache in Github actions. The cache files are stored in GitHub caches.

Prerequisite

Rush.js >= 5.85.0

Installation

Please refer to the official documentation to use rush plugins.

  1. Add the plugin as a dependency in autoinstaller/rush-plugins/package.json file to include the plugin.
{
  ---
  "dependencies": {
    "@gigara/rush-github-action-build-cache-plugin": "^1.1.1"
  }
  ---
}
  1. Run the rush update-autoinstaller --name rush-plugins command to update the autoinstaller with plugin dependency.

  2. In common/config/rush/rush-plugins.json, Add the plugin to the plugins array.

{
  "plugins": [
    {
      "packageName": "@gigara/rush-github-action-build-cache-plugin",
      "pluginName": "rush-github-action-build-cache-plugin",
      "autoinstallerName": "rush-plugins"
    }
  ]
}
  1. Run the rush update command to install the plugin and update the Rush configuration.

  2. Set cacheProvider in common/config/rush/build-cache.json.

"cacheProvider": "github-action-build-cache",

Usage

You need to set ACTIONS_CACHE_URL and ACTIONS_RUNTIME_TOKEN envs in GitHub actions. Otherwise the plugin will fail to upload/download the cache.

You can use the rush-cache Github action to set envs.

- name: Set cache env
  uses: gigara/rush-cache@v2

After you have set up the plugin correctly, rush build command in GitHub actions will automatically save and restore the cache.

Contributing

Contributions are welcome! Please create a pull request on the Github repository.

License

This project is licensed under the Apache 2 License. See the LICENSE file for details.

版本与发布记录

@gigara/rush-github-action-build-cache-plugin 共发布 18 个版本,首次发布于 2023/03/02;过去 12 个月发布了 7 个版本。

版本发布日期距今
1.1.8latest2026/02/188 个月前
1.1.72026/02/188 个月前
1.1.62026/02/188 个月前
1.1.52026/02/188 个月前
1.1.42026/02/029 个月前
1.1.32026/02/029 个月前

关于 @gigara/rush-github-action-build-cache-plugin 的常见问题

@gigara/rush-github-action-build-cache-plugin 是什么?

Rush build-cache plugin for Github Actions

如何安装 @gigara/rush-github-action-build-cache-plugin?

在项目目录运行 npm install @gigara/rush-github-action-build-cache-plugin,或使用 pnpm add / yarn add / bun add。

@gigara/rush-github-action-build-cache-plugin 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/gigara__rush-github-action-build-cache-plugin 是否存在。

@gigara/rush-github-action-build-cache-plugin 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@gigara/rush-github-action-build-cache-plugin 可以商用吗?

@gigara/rush-github-action-build-cache-plugin 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@gigara/rush-github-action-build-cache-plugin 的下载量有多少?

根据 npm 官方下载统计,@gigara/rush-github-action-build-cache-plugin 在 2026/10/17 – 2026/11/15 这 30 天内被下载 7,020 次,日均约 234 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@gigara/rush-github-action-build-cache-plugin 还在维护吗?

最新版本 1.1.8 发布于 2026/02/18(8 个月前);至今共发布 18 个版本,其中过去 12 个月发布了 7 个;首次发布于 2023/03/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。