0.2.8 • Published 8 months ago

actions-kit v0.2.8

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

actions-kit

npm version npm downloads

A tiny toolkit for GitHub Actions.

!WARNING This package is still in development, and can change at any time.

📦 Installation

pnpm install actions-kit

🚀 Usage

This package contains a set of utilities to help you build GitHub Actions.

getSafeValidatedInput

This utility helps you get the input from the action and validate it using Zod's safeParse method.

import { getSafeValidatedInput } from "actions-kit";
import { z } from "zod";

const schema = z.string().min(1);
const input = getSafeValidatedInput("example_input", schema);

if (input.success) {
  console.log("Valid input:", input.data);
} else {
  console.error("Validation errors:", input.error);
}

!NOTE There is also exported getSafeValidatedInputAsync which is an async version of getSafeValidatedInput.

getSafeValidatedInput

This utility helps you get the input from the action and validate it using Zod's parse method.

import { getValidatedInput } from "actions-kit";
import { z } from "zod";

const schema = z.string().min(1);
const input = getValidatedInput("example_input", schema);

console.log("Valid input:", input.data);

!NOTE There is also exported getValidatedInputAsync which is an async version of getValidatedInput.

📄 License

Published under MIT License.

0.2.7

8 months ago

0.2.6

8 months ago

0.2.8

8 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.2.3

9 months ago

0.2.2

9 months ago

0.2.5

9 months ago

0.2.4

9 months ago

0.1.0-beta.3

9 months ago

0.1.0-beta.2

9 months ago

0.1.0-beta.5

9 months ago

0.1.0-beta.4

9 months ago

0.1.0-beta.1

9 months ago

0.1.0

9 months ago

0.1.0-beta.7

9 months ago

0.1.0-beta.6

9 months ago

0.0.1

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.6

9 months ago

0.0.0

12 months ago