Step inputs

Last updated at 2021-04-29

Japanese translation unavailable

This page has not been translated into Japanese yet - we apologise for the inconvenience! If you’re interested in helping us out, feel free to translate any article in the jp folder of the DevCenter repository and open a PR!

このページは日本語への翻訳がまだ完了しておりません。ご不便をおかけして申し訳ございません! もしお手伝いできる方がいらっしゃれば、ご自由にjpフォルダの記事を日本語に訳していただき、PRを開いてください

Step inputs are environment items that tell the Bitrise CLI how to run a given Step. As discussed in the Steps section, the default inputs can be found in the step.yml file of every step and the user only needs to manually set the inputs they wish to change.

Step inputs can be defined in the step.yml file of the project by setting the inputs property. They have the same syntax as every environment property. It consists of two main parts: a KEY: value pair and an opts field.

- my_key_for_the_env: "default value" 
    title: An example env var item 
    is_dont_change_value: false 
    category: example

Of course, a step input can have many more properties - let’s take a look at them!

Using template expressions for step inputs

If you need a step to use a certain value only in certain circumstances, use template expressions as step inputs. Template expressions are evaluated before the step uses the input. They are written in Go’s template language - you can read more about that here.

Set the is_template property in the step.yml file of your project to use template expressions.

  1. Open the step.yml file of your project.
  2. Find the step in which you wish to use a template expression.
  3. Add an opts field to the content of the step.
  4. Add the is_template property to opts and set its value to true.
  5. Add the template expression to the step’s content.


- script:
  title: Template example
  - content: |-
      echo "CI mode"
      echo "not CI mode"
      is_template: true

Check out the template utility on GitHub!