Skip to content

Commit 92bae2e

Browse files
authored
Merge pull request #39170 from github/repo-sync
Repo sync
2 parents 3a21cc0 + 284be64 commit 92bae2e

File tree

28 files changed

+553
-66
lines changed

28 files changed

+553
-66
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Expressions
3+
intro: 'You can evaluate expressions in workflows and actions.'
4+
versions:
5+
fpt: '*'
6+
ghes: '*'
7+
ghec: '*'
8+
type: overview
9+
topics:
10+
- Actions
11+
- Workflows
12+
---
13+
14+
## About expressions
15+
16+
You can use expressions to programmatically set environment variables in workflow files and access contexts. An expression can be any combination of literal values, references to a context, or functions. You can combine literals, context references, and functions using operators. For more information about contexts, see [AUTOTITLE](/actions/learn-github-actions/contexts).
17+
18+
Expressions are commonly used with the conditional `if` keyword in a workflow file to determine whether a step should run. When an `if` conditional is `true`, the step will run.
19+
20+
{% data reusables.actions.expressions-syntax-evaluation %}
21+
22+
{% raw %}
23+
`${{ <expression> }}`
24+
{% endraw %}
25+
26+
> [!NOTE]
27+
> The exception to this rule is when you are using expressions in an `if` clause, where, optionally, you can usually omit {% raw %}`${{`{% endraw %} and {% raw %}`}}`{% endraw %}. For more information about `if` conditionals, see [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif).
28+
29+
{% data reusables.actions.context-injection-warning %}
30+
31+
### Example setting an environment variable
32+
33+
{% raw %}
34+
35+
```yaml
36+
env:
37+
MY_ENV_VAR: ${{ <expression> }}
38+
```
39+
40+
{% endraw %}
41+
42+
## Further reading
43+
44+
For technical reference information about expressions you can use in workflows and actions, see [AUTOTITLE](/actions/reference/evaluate-expressions-in-workflows-and-actions).

content/actions/concepts/workflows-and-actions/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ children:
1111
- /avoiding-duplication
1212
- /about-custom-actions
1313
- /contexts
14+
- /expressions
1415
- /about-monitoring-workflows
1516
- /notifications-for-workflow-runs
1617
- /about-troubleshooting-workflows

content/actions/reference/evaluate-expressions-in-workflows-and-actions.md

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Evaluate expressions in workflows and actions
3-
shortTitle: Expressions
4-
intro: You can evaluate expressions in workflows and actions.
3+
shortTitle: Expressions reference
4+
intro: Find information for expressions in {% data variables.product.prodname_actions %}.
55
versions:
66
fpt: '*'
77
ghes: '*'
@@ -12,36 +12,6 @@ redirect_from:
1212
- /actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions
1313
---
1414

15-
{% data reusables.actions.enterprise-github-hosted-runners %}
16-
17-
## About expressions
18-
19-
You can use expressions to programmatically set environment variables in workflow files and access contexts. An expression can be any combination of literal values, references to a context, or functions. You can combine literals, context references, and functions using operators. For more information about contexts, see [AUTOTITLE](/actions/learn-github-actions/contexts).
20-
21-
Expressions are commonly used with the conditional `if` keyword in a workflow file to determine whether a step should run. When an `if` conditional is `true`, the step will run.
22-
23-
{% data reusables.actions.expressions-syntax-evaluation %}
24-
25-
{% raw %}
26-
`${{ <expression> }}`
27-
{% endraw %}
28-
29-
> [!NOTE]
30-
> The exception to this rule is when you are using expressions in an `if` clause, where, optionally, you can usually omit {% raw %}`${{`{% endraw %} and {% raw %}`}}`{% endraw %}. For more information about `if` conditionals, see [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif).
31-
32-
{% data reusables.actions.context-injection-warning %}
33-
34-
### Example setting an environment variable
35-
36-
{% raw %}
37-
38-
```yaml
39-
env:
40-
MY_ENV_VAR: ${{ <expression> }}
41-
```
42-
43-
{% endraw %}
44-
4515
## Literals
4616

4717
As part of an expression, you can use `boolean`, `null`, `number`, or `string` data types.

content/admin/data-residency/feature-overview-for-github-enterprise-cloud-with-data-residency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The following features are currently unavailable on {% data variables.enterprise
2828
| {% data variables.product.prodname_copilot %} Workspaces | Currently unavailable | N/A |
2929
| {% data variables.copilot.copilot_extensions %} | Currently unavailable | [AUTOTITLE](/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat) |
3030
| {% data variables.product.prodname_copilot_short %} Metrics API | Currently unavailable | [AUTOTITLE](/rest/copilot/copilot-metrics) |
31-
| {% data variables.copilot.copilot_coding_agent %} | Currently unavailable | [AUTOTITLE](/copilot/using-github-copilot/coding-agent/about-assigning-tasks-to-copilot) |
31+
| {% data variables.copilot.copilot_coding_agent %} | Currently unavailable | [AUTOTITLE](/copilot/concepts/about-copilot-coding-agent) |
3232
| Restricting {% data variables.product.prodname_actions %} policies to verified creators | Currently unavailable | [AUTOTITLE](/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#allow-enterprise-and-select-non-enterprise-actions-and-reusable-workflows) |
3333
| Billing for premium requests in {% data variables.product.prodname_copilot_short %} | Currently unavailable | [AUTOTITLE](/copilot/managing-copilot/understanding-and-managing-copilot-usage/understanding-and-managing-requests-in-copilot) |
3434
| {% data variables.product.prodname_github_models %} | Currently unavailable | [AUTOTITLE](/github-models/about-github-models) |

content/billing/managing-billing-for-your-products/about-billing-for-github-copilot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ When you use {% data variables.copilot.copilot_coding_agent %}, {% data variable
7575

7676
On average, {% data variables.copilot.copilot_coding_agent %} uses 30-50 premium requests each time it is invoked. The exact number of premium requests will vary depending on the task’s complexity and the number of required steps. See [AUTOTITLE](/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/monitoring-usage-and-entitlements/avoiding-unexpected-copilot-costs).
7777

78-
For more information about {% data variables.copilot.copilot_coding_agent %}, see [AUTOTITLE](/copilot/using-github-copilot/coding-agent/about-assigning-tasks-to-copilot).
78+
For more information about {% data variables.copilot.copilot_coding_agent %}, see [AUTOTITLE](/copilot/concepts/about-copilot-coding-agent).
7979

8080
### What happens if you have used up your monthly quota?
8181

0 commit comments

Comments
 (0)