Skip to content

Latest commit

 

History

History
57 lines (44 loc) · 2.97 KB

README.md

File metadata and controls

57 lines (44 loc) · 2.97 KB

YAML Schema Tool (for GitHub Actions)

Inject your organization's custom GitHub Actions runner labels into a YAML schema. (Tested with SchemaStore)

Requirements

node >= 12.22

Installation

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

Usage

node app.mjs

License

MIT