Rush build-cache plugin for Github Actions
npm install @gigara/rush-github-action-build-cache-pluginRush.js >= 5.85.0
autoinstaller/rush-plugins/package.json file to include the plugin.```
{
---
"dependencies": {
"@gigara/rush-github-action-build-cache-plugin": "^1.1.1"
}
---
}
2. Run the rush update-autoinstaller --name rush-plugins command to update the autoinstaller with plugin dependency.
3. 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"
}
]
}rush update
6. Run the command to install the plugin and update the Rush configuration.
7. Set cacheProvider in common/config/rush/build-cache.json.``
"cacheProvider": "github-action-build-cache",
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.Contributions are welcome! Please create a pull request on the Github repository.