diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..3f9bc13 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,39 @@ + + +## Build + +To build the layout, run `script/build.sh` + +## Actions + +### Add an action + +To add an action, run `script/add-action.sh` + +__Example adding an action__ + +``` +script/add-action.sh actions/checkout +``` + +### Update an action + +To update the refs for an action, run `script/update-action.sh` + +__Example updating one action__ + +``` +script/update-action.sh actions/checkout +``` + +__Example updating all actions__ + +``` +script/update-action.sh --all +``` + +- If you hand-edit an action config, make sure you run `script/build.sh` to regenerate the action build scripts. + +## Troubleshooting + +Set `GITHUB_ACTIONS_DEBUG=1` for debug output diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bc84820 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) +Copyright (c) 2023 GitHub + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index c4b3160..b26ceb8 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,19 @@ # GitHub First Party Actions Cache -This repository builds the layout for first party actions cache. +This repository contains the code and scripts responsible for caching actions locally on a GitHub [Actions Runner](https://github.com/actions/runner). + +This allows you to speedup actions execution without the cost of downloading actions during the course of your job during the `Setup Job` step. This repository only caches the most popular first party actions, to save disk space. A configuration file exists for each repository (see `config/actions/`). The refs are pinned to specific commit SHAs. -## Build - -To build the layout, run `script/build.sh` - -## Actions - -### Add an action - -To add an action, run `script/add-action.sh` - -__Example adding an action__ - -``` -script/add-action.sh actions/checkout -``` - ### Which refs are included? -By default only `master` and version tags are included. For example: `v1` or `v2.0.1` +By default only `main` and version tags are included. For example: `v1` or `v2.0.1` Preview versions are intentionally excluded. For example: `v2-beta` Optional args may be supplied to control which refs are included. See `script/add-action.sh --help` for more info. -### Update an action - -To update the refs for an action, run `script/update-action.sh` - -__Example updating one action__ - -``` -script/update-action.sh actions/checkout -``` - -__Example updating all actions__ - -``` -script/update-action.sh --all -``` - -- If you hand-edit an action config, make sure you run `script/build.sh` to regenerate the action build scripts. - -## Troubleshooting - -Set `GITHUB_ACTIONS_DEBUG=1` for debug output +### Contributing +See the [contribution guide](../github/CONTRIBUTING.MD). Currently we are not taking requests for non first party actions to be added at this time.