Inject your organization's custom GitHub Actions runner labels into a YAML schema. (Tested with SchemaStore)
node >= 12.22
Clone the repository
git clone https://github.com/gbhand/YAMLSchemaTool.git
cd YAMLSchemaTool
Install module
npm install
Configure environment
echo "GH_PAT=" > .env
echo "ORG=" >> .env
echo "SCHEMA_URL=" >> .env
echo "OUTPUT_PATH=" >> .env
These values should be filled in as follows:
Name | Description | |
---|---|---|
GH_PAT |
GitHub Personal AccessToken with admin:org scope, required for getting runner labels. See how to generate |
Required |
ORG |
Organization name on GitHub | Required |
SCHEMA_URL |
Path to base schema to be modified. Example | Required |
OUTPUT_PATH |
Local path to output file. Defaults to outputs/{basename} |
Optional |
Integrate with YAML Language Support (VSCode)
// add this to your settings.json (globs are supported)
"yaml.schemas": {
"file://PATH_TO_JSON_OUTPUT": "file://PATH_TO_WORKFLOW"
}
node app.mjs
MIT