Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srz-zumix/provide-default-inputs-action
This is an action to get the default value of inputs. Use this as a replacement value for events without inputs.
https://github.com/srz-zumix/provide-default-inputs-action
actions github-actions
Last synced: about 2 months ago
JSON representation
This is an action to get the default value of inputs. Use this as a replacement value for events without inputs.
- Host: GitHub
- URL: https://github.com/srz-zumix/provide-default-inputs-action
- Owner: srz-zumix
- License: mit
- Created: 2024-03-22T15:10:59.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-09T05:56:10.000Z (8 months ago)
- Last Synced: 2024-05-09T06:43:19.342Z (8 months ago)
- Topics: actions, github-actions
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# provide-default-inputs-action
This is an action to get the default value of inputs.
Use this as a replacement value for events without inputs.## Usage
```yaml
on:
pull_request:
workflow_dispatch:
inputs:
test:
type: string
default: 'hoge'
required: false
flag:
type: boolean
default: false
required: false
text:
type: string
required: falsejobs:
test:
runs-on: ubuntu-latest
steps:
- uses: srz-zumix/provide-default-inputs-action@v0
id: inputs-test
with:
name: test
- uses: srz-zumix/provide-default-inputs-action@v0
id: inputs-all
- name: DoSomething
env:
INPUTS_TEST: ${{ inputs.test || steps.inputs-test.outputs.value }}
INPUTS_FLAG: ${{ inputs.flag || fromJson(steps.inputs-all.outputs.value).flag }}
INPUTS_TEXT: ${{ inputs.text || fromJson(steps.inputs-all.outputs.value).text }}
```## Feature
### Check Diff
Outputs the difference between workflow_dispatch and workflow_call inputs as a summary.
![check-diff example](https://github.com/srz-zumix/provide-default-inputs-action/assets/1439172/eb7af48c-24e9-42e0-8ef2-49a91ea9b240)