This action returns a list with the names of selected checkboxes from the input
of a workflow_dispatch
event. It supports the use of custom separator strings
and an ignore list, which will be ignored from the output.
Here's an example of how to use this action in a workflow file:
on:
workflow_dispatch:
inputs: # Example inputs
api:
type: boolean
worker1:
type: boolean
worker2:
type: boolean
jobs:
get-selected:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: get-selected-step
uses: joao-zanutto/[email protected]
- run: echo ${{ steps.get-selected-step.outputs.selected }}
Running the workflow:
Will generate the following output:
jobs:
get-selected:
runs-on: ubuntu-latest
outputs: # Set this to consume the output on other job
selected: ${{ steps.get-selected-step.outputs.selected}}
steps:
- uses: actions/checkout@v4
- id: get-selected-step
uses: joao-zanutto/[email protected]
consume-on-another-job:
runs-on: ubuntu-latest
needs: get-selected
steps:
- run: echo ${{ needs.get-selected.outputs.selected }}
Input | Required | Default | Description |
---|---|---|---|
ignore |
false |
null |
Comma-separated options to ignore |
format |
false |
'list' |
Output format. list or json |
separator |
false |
' ' |
Separator; only vaid for format: list |
Output | Description |
---|---|
selected |
Names of the selected checkboxes |