You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/actions/reference/workflows-and-actions/expressions.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ env:
66
66
67
67
> [!NOTE]
68
68
> * {% data variables.product.company_short %} ignores case when comparing strings.
69
-
> * `steps.<step_id>.outputs.<output_name>` evaluates as a string. {% data reusables.actions.expressions-syntax-evaluation %} For more information, see [AUTOTITLE](/actions/learn-github-actions/contexts#steps-context).
69
+
> * `steps.<step_id>.outputs.<output_name>` evaluates as a string. {% data reusables.actions.expressions-syntax-evaluation %} For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/contexts#steps-context).
70
70
> * For numerical comparison, the `fromJSON()` function can be used to convert a string to a number. For more information on the `fromJSON()` function, see [fromJSON](#fromjson).
71
71
72
72
{% data variables.product.prodname_dotcom %} performs loose equality comparisons.
@@ -315,9 +315,9 @@ Sets `MY_ENV_VAR` based on the branch: `production` for `main`, `staging` for `s
315
315
316
316
## Status check functions
317
317
318
-
You can use the following status check functions as expressions in `if` conditionals. A default status check of `success()` is applied unless you include one of these functions. For more information about `if` conditionals, see [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif) and [AUTOTITLE](/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsif).
318
+
You can use the following status check functions as expressions in `if` conditionals. A default status check of `success()` is applied unless you include one of these functions. For more information about `if` conditionals, see [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idif) and [AUTOTITLE](/actions/reference/workflows-and-actions/metadata-syntax#runsstepsif).
319
319
320
-
Outside `if` conditionals, you can use `job.status` to access the job status. For more information, see [AUTOTITLE](/actions/reference/contexts-reference#job-context).
320
+
Outside `if` conditionals, you can use `job.status` to access the job status. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/contexts#job-context).
Copy file name to clipboardExpand all lines: content/actions/reference/workflows-and-actions/metadata-syntax.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ This example configures two inputs: `num-octocats` and `octocat-eye-color`. The
46
46
> [!NOTE]
47
47
> Actions using `required: true` will not automatically return an error if the input is not specified.
48
48
49
-
Workflow files that use this action can use the `with` keyword to set an input value for `octocat-eye-color`. For more information about the `with` syntax, see [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepswith).
49
+
Workflow files that use this action can use the `with` keyword to set an input value for `octocat-eye-color`. For more information about the `with` syntax, see [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepswith).
50
50
51
51
```yaml
52
52
inputs:
@@ -61,9 +61,9 @@ inputs:
61
61
62
62
When you specify an input, {% data variables.product.prodname_dotcom %} creates an environment variable for the input with the name `INPUT_<VARIABLE_NAME>`. The environment variable created converts input names to uppercase letters and replaces spaces with `_` characters.
63
63
64
-
If the action is written using a [composite](/actions/creating-actions/creating-a-composite-action), then it will not automatically get `INPUT_<VARIABLE_NAME>`. With composite actions you can use `inputs` [AUTOTITLE](/actions/learn-github-actions/contexts) to access action inputs.
64
+
If the action is written using a [composite](/actions/tutorials/create-actions/create-a-composite-action), then it will not automatically get `INPUT_<VARIABLE_NAME>`. With composite actions you can use the [`inputs` context](/actions/reference/workflows-and-actions/contexts#inputs-context) to access action inputs.
65
65
66
-
To access the environment variable in a Docker container action, you must pass the input using the `args` keyword in the action metadata file. For more information about the action metadata file for Docker container actions, see [AUTOTITLE](/actions/creating-actions/creating-a-docker-container-action#creating-an-action-metadata-file).
66
+
To access the environment variable in a Docker container action, you must pass the input using the `args` keyword in the action metadata file. For more information about the action metadata file for Docker container actions, see [AUTOTITLE](/actions/tutorials/use-containerized-services/create-a-docker-container-action#creating-an-action-metadata-file).
67
67
68
68
For example, if a workflow defined the `num-octocats` and `octocat-eye-color` inputs, the action code could read the values of the inputs using the `INPUT_NUM-OCTOCATS` and `INPUT_OCTOCAT-EYE-COLOR` environment variables.
69
69
@@ -93,7 +93,7 @@ For example, if a workflow defined the `num-octocats` and `octocat-eye-color` in
93
93
94
94
{% data reusables.actions.output-limitations %}
95
95
96
-
If you don't declare an output in your action metadata file, you can still set outputs and use them in a workflow. For more information on setting outputs in an action, see [AUTOTITLE](/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter).
96
+
If you don't declare an output in your action metadata file, you can still set outputs and use them in a workflow. For more information on setting outputs in an action, see [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-commands#setting-an-output-parameter).
97
97
98
98
### Example: Declaring outputs for Docker container and JavaScript actions
99
99
@@ -140,7 +140,7 @@ runs:
140
140
141
141
**Required** The value that the output parameter will be mapped to. You can set this to a `string` or an expression with context. For example, you can use the `steps` context to set the `value` of an output to the output value of a step.
142
142
143
-
For more information on how to use context syntax, see [AUTOTITLE](/actions/learn-github-actions/contexts).
143
+
For more information on how to use context syntax, see [AUTOTITLE](/actions/reference/workflows-and-actions/contexts).
144
144
145
145
## `runs`
146
146
@@ -263,17 +263,17 @@ runs:
263
263
shell: bash
264
264
```
265
265
266
-
For more information, see [AUTOTITLE](/actions/learn-github-actions/contexts#github-context).
266
+
For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/contexts#github-context).
267
267
268
268
#### `runs.steps[*].shell`
269
269
270
-
**Optional** The shell where you want to run the command. You can use any of the shells listed in [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell). Required if `run` is set.
270
+
**Optional** The shell where you want to run the command. You can use any of the shells listed in [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsshell). Required if `run` is set.
271
271
272
272
#### `runs.steps[*].if`
273
273
274
274
**Optional** You can use the `if` conditional to prevent a step from running unless a condition is met. You can use any supported context and expression to create a conditional.
275
275
276
-
{% data reusables.actions.expression-syntax-if %} For more information, see [AUTOTITLE](/actions/learn-github-actions/expressions).
276
+
{% data reusables.actions.expression-syntax-if %} For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/expressions).
277
277
278
278
**Example: Using contexts**
279
279
@@ -287,7 +287,7 @@ steps:
287
287
288
288
**Example: Using status check functions**
289
289
290
-
The `my backup step` only runs when the previous step of a composite action fails. For more information, see [AUTOTITLE](/actions/learn-github-actions/expressions#status-check-functions).
290
+
The `my backup step` only runs when the previous step of a composite action fails. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/expressions#status-check-functions).
291
291
292
292
```yaml
293
293
steps:
@@ -304,7 +304,7 @@ steps:
304
304
305
305
#### `runs.steps[*].id`
306
306
307
-
**Optional** A unique identifier for the step. You can use the `id` to reference the step in contexts. For more information, see [AUTOTITLE](/actions/learn-github-actions/contexts).
307
+
**Optional** A unique identifier for the step. You can use the `id` to reference the step in contexts. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/contexts).
308
308
309
309
#### `runs.steps[*].env`
310
310
@@ -323,7 +323,7 @@ We strongly recommend that you include the version of the action you are using b
323
323
* Using the specific major action version allows you to receive critical fixes and security patches while still maintaining compatibility. It also assures that your workflow should still work.
324
324
* Using the default branch of an action may be convenient, but if someone releases a new major version with a breaking change, your workflow could break.
325
325
326
-
Some actions require inputs that you must set using the [`with`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepswith) keyword. Review the action's README file to determine the inputs required.
326
+
Some actions require inputs that you must set using the [`with`](/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepswith) keyword. Review the action's README file to determine the inputs required.
327
327
328
328
```yaml
329
329
runs:
@@ -421,7 +421,7 @@ runs:
421
421
422
422
**Optional** Overrides the Docker `ENTRYPOINT` in the `Dockerfile`, or sets it if one wasn't already specified. Use `entrypoint` when the `Dockerfile` does not specify an `ENTRYPOINT` or you want to override the `ENTRYPOINT` instruction. If you omit `entrypoint`, the commands you specify in the Docker `ENTRYPOINT` instruction will execute. The Docker `ENTRYPOINT` instruction has a _shell_ form and _exec_ form. The Docker `ENTRYPOINT` documentation recommends using the _exec_ form of the `ENTRYPOINT` instruction.
423
423
424
-
For more information about how the `entrypoint` executes, see [AUTOTITLE](/actions/creating-actions/dockerfile-support-for-github-actions#entrypoint).
424
+
For more information about how the `entrypoint` executes, see [AUTOTITLE](/actions/reference/workflows-and-actions/dockerfile-support#entrypoint).
425
425
426
426
### `runs.post-entrypoint`
427
427
@@ -447,7 +447,7 @@ The `args` are used in place of the `CMD` instruction in a `Dockerfile`. If you
447
447
448
448
If you need to pass environment variables into an action, make sure your action runs a command shell to perform variable substitution. For example, if your `entrypoint` attribute is set to `"sh -c"`, `args` will be run in a command shell. Alternatively, if your `Dockerfile` uses an `ENTRYPOINT` to run the same command (`"sh -c"`), `args` will execute in a command shell.
449
449
450
-
For more information about using the `CMD` instruction with {% data variables.product.prodname_actions %}, see [AUTOTITLE](/actions/creating-actions/dockerfile-support-for-github-actions#cmd).
450
+
For more information about using the `CMD` instruction with {% data variables.product.prodname_actions %}, see [AUTOTITLE](/actions/reference/workflows-and-actions/dockerfile-support#cmd).
451
451
452
452
#### Example: Defining arguments for the Docker container
0 commit comments