Skip to content

Files

Latest commit

 

History

History
68 lines (57 loc) · 2.17 KB

README.md

File metadata and controls

68 lines (57 loc) · 2.17 KB

actions-yaml

Summary

Prototype for porting the Actions workflow parser and template expansion library to TypeScript.

Key aspects:

  • Portability
    • Enables converging on one implementation. JavaScript can be consumed directly within the web UI. Services can consume as a container (REST interface). Also supports command-line interface.
  • Safe to run on servers
    • Memory safeguards are deeply built into expressions and templating libraries
  • Schema-driven; generic underlying expressions and templates library
    • Schema-validating reader which can be used to parse/expand other schemas - e.g. action.yml or stack.yml

Folder structure

  • ./expressions/
    • Generic expression library
  • ./templates/
    • Generic templating library
    • template-reader.ts reads a file
      • reads DOM using ObjectReader interface; convert to TemplateToken; schema validate
    • template-evaluator.ts expands a TemplateToken
      • expands a TemplateToken; schema validates result
  • ./workflows/
    • Parses and expands an Actions workflow.yml

Development setup

npm install # install npm dependencies
npm run build # compile ts -> js
npm run test # run the tests