1.0.0 • Published 1 year ago

@action-class/action-yml v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@action-class/action-yml

Typed representation of the action.yml structure. See Metadata syntax for GitHub Actions for more information about the action.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.