Skip to content

Commit 2fee509

Browse files
Adds composite info about inputs and environment variables.
Adds information regarding the INPUT_ environment variable conversion as discussed at actions/runner#665.
1 parent d45b506 commit 2fee509

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

content/actions/creating-actions/metadata-syntax-for-github-actions.md

+20
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,26 @@ For example, if a workflow defined the numOctocats and octocatEyeColor inputs, t
7676

7777
**Optional** A `string` representing the default value. The default value is used when an input parameter isn't specified in a workflow file.
7878

79+
### `inputs` for composite run steps actions
80+
81+
Composite actions won't automatically convert an input argument into `INPUT_<VARIABLE_NAME>`, instead a similar behavior can be attained by manually mapping every variable wanted, for instance:
82+
83+
```
84+
inputs:
85+
`my-input-parameter:
86+
description: 'An input parameter to illustrate the use case'
87+
required: false
88+
runs:
89+
using: "composite"
90+
steps:
91+
- run: my-awesome-action.sh
92+
shell: bash
93+
env:
94+
INPUT_MY_INPUT_PARAMETER: ${{ inputs.my-input-parameter }}
95+
```
96+
97+
Other alternatives include passing the input parameter as arguments to the command, etcetera. Further discussion on the subject happened at [actions/runner#665](https://github.com/actions/runner/issues/665).
98+
7999
### `outputs`
80100

81101
**Optional** Output parameters allow you to declare data that an action sets. Actions that run later in a workflow can use the output data set in previously run actions. For example, if you had an action that performed the addition of two inputs (x + y = z), the action could output the sum (z) for other actions to use as an input.

0 commit comments

Comments
 (0)