Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/simenandre/setup-inputs

🕶️ Parse GitHub Actions inputs from both `workflow_dispatch` and `repository_dispatch` events
https://github.com/simenandre/setup-inputs

action actions github-actions parser repository-dispatch workflow workflow-dispatch

Last synced: 23 days ago
JSON representation

🕶️ Parse GitHub Actions inputs from both `workflow_dispatch` and `repository_dispatch` events

Awesome Lists containing this project

README

        

# setup-inputs

This action parses inputs regardless of which event triggered the workflow.

It is currently useful for workflows that both use dispatch methods,
`repository_dispatch` and `workflow_dispatch`. In the future, we might add
support for more events and input validation.

## Quickstart

```yaml
- uses: simenandre/setup-inputs@v1
id: inputs
```

With that you can access the inputs for both repository and workflow dispatch as
such:

```yaml
- runs: ${{ steps.inputs.outputs.a-string }}
```

Or the whole JSON object, as such:

```yaml
- runs: ${{ steps.inputs.outputs.payload }}
```

## Example

See the [testing.yml](.github/workflows/testing.yml) for a full example.