
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
actions-inputs
Advanced tools
[GitHub Actions] Auto generate action.yml input params types for usage in TypeScript
[GitHub Actions] Auto generate and use input parameters in TypeScript
Main goal of this module is to auto-generate type-safe code for working with GitHub Actions inputs.
yarn|npm add actions-inputs
action.yml
with input parameters like this:inputs:
# You can also use uppercase here. It doesn't really matter.
COMMIT_MESSAGE:
description: |
The commit message that will be used to commit the changed files. Check the README for all interpolation options.
# if input isn't provided, Action runner will pick default value even if required is true
default: "auto-update: replace files from source"
required: false
DRY_RUN:
# specify type explicity here if it isn't a string and you don't have default value
description: |
[boolean] Run everything except for the copying, removing and commiting functionality.
required: true
RETRIES:
description:
[number] The number of retries.
# You can specify string in default, it will be parsed to number anyway.
default: 3
required: false
postinstall
script in package.json
:{
"scripts": {
//...
"postinstall": "actions-inputs generate"
}
}
postinstall
script or yarn actions-inputs generate
command in order to generate library so that you can safely use it in your code. You need to run this command every time after you edit action.yml
.import { inputs } from "actions-inputs";
inputs.dry_run
// => boolean
inputs.retries
// => 3 (if user doesn't provide their value)
postinstall
script.You can set options before first getInput
call.
List of options: interface Options.
By default the type infers from input's default
property, but if it's required and not a string, you need to specify type in start of description
like this: description: [boolean] should I show you a red light?
.
true
, false
, 0
, 1
54.33
, Infinity
. Invalid: 5 px
inputs
edit in action.yml
(show warning on main
)FAQs
[GitHub Actions] Auto generate action.yml input params types for usage in TypeScript
We found that actions-inputs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.