janinawibker/Scripting Action
Proper scripting with TypeScript in Github Actions using bun. Includes sane defaults, useful helpers, an authenticated octokit instance and other useful integrations. Inspired by actions/github-script.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| file | Relative path to typescript file. This requires doing a checkout beforehand. Can only specify either `file` or `script`, not both. Assumes the default export is the async function to run. See docs for details about the function signature, how to pass in arguments, how module resolution works and more. | no | — |
| script | Inline typescript, same behavior as `file`, but acting as the body of a function instead of an entire file with a default export. Can only specify either `file` or `script`, not both. See docs for more details. | no | — |
| input_encoding | Either string or json, see `input`. | no | string |
| input | Input passed to script. Depending on `input-encoding` either assumed to be a string, or passed to `JSON.parse`. Defaults to `""` or `{}` respectively. Alternatively to easier pass in more values at once use environment variables. | no | — |
| result_encoding | Either string or json, see `result`. | no | string |
| token | The GitHub token used to create an authenticated client | yes | ${{ github.token }} |
| debug | Whether to tell the GitHub client to log details of its requests. true or false. Default is to run in debug mode when the GitHub Actions step debug logging is turned on. | — | ${{ runner.debug == '1' }} |
Outputs
| name | description |
|---|---|
| result | The return value of the script. Depending on `result-encoding` either assumed to be a string, or passed to `JSON.stringify` |