@action-class/action-yml
v1.0.0
Published
Typed representation of the action.yml structure
Downloads
4
Readme
@action-class/action-yml
Typed representation of the
action.yml
structure. See Metadata syntax for GitHub Actions for more information about theaction.yml
structure.
Usage
Install the package
npm install @action-class/action-yml
Import the ActionYml
type
import type { ActionYml } from '@action-class/action-yml';
Examples
Read an action.yml
file
This example reads an action.yml
file and parses it into a ActionYml
object using the js-yaml
package.
import * as fs from 'fs/promises';
import * as yaml from 'js-yaml';
import type { ActionYml } from '@action-class/action-yml';
const actionYml = yaml.load(await fs.readFile('action.yml', 'utf8')) as ActionYml;
License
This library is published under the MIT license.