1.0.7 • Published 1 year ago

@gigara/rush-github-action-build-cache-plugin v1.0.7

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

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.0.4"
  }
  ---
}
  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.

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago