[EDI] Actions variables (#56456) · github/docs@66c642b · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit 66c642b

Browse files
jc-clarksubatoi
andauthored
[EDI] Actions variables (#56456)
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
1 parent 276a122 commit 66c642b

File tree

13 files changed

+179
-147
lines changed

13 files changed

+179
-147
lines changed

content/actions/concepts/workflows-and-actions/about-custom-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Many people access {% data variables.product.github %} at a domain other than {%
8383

8484
To ensure that your action is compatible with other platforms, do not use any hard-coded references to API URLs such as `https://api.github.com`. Instead, you can:
8585

86-
* Use environment variables (see [AUTOTITLE](/actions/learn-github-actions/variables#default-environment-variables)):
86+
* Use environment variables (see [AUTOTITLE](/actions/reference/variables-reference#default-environment-variables)):
8787

8888
* For the REST API, use the `GITHUB_API_URL` environment variable.
8989
* For GraphQL, use the `GITHUB_GRAPHQL_URL` environment variable.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ versions:
77
ghec: '*'
88
children:
99
- /about-workflows
10+
- /variables
1011
- /avoiding-duplication
1112
- /about-custom-actions
1213
- /about-monitoring-workflows
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Variables
3+
intro: 'Learn about variables in {% data variables.product.prodname_actions %} workflows.'
4+
versions:
5+
fpt: '*'
6+
ghes: '*'
7+
ghec: '*'
8+
type: overview
9+
topics:
10+
- Action development
11+
- Fundamentals
12+
---
13+
14+
## About
15+
16+
Variables provide a way to store and reuse non-sensitive configuration information. You can store any configuration data such as compiler flags, usernames, or server names as variables. Variables are interpolated on the runner machine that runs your workflow. Commands that run in actions or workflow steps can create, read, and modify variables.
17+
18+
You can set your own custom variables or use the default environment variables that {% data variables.product.prodname_dotcom %} sets automatically.
19+
20+
You can set a custom variable in two ways.
21+
22+
* To define an environment variable for use in a single workflow, you can use the `env` key in the workflow file. For more information, see [Defining environment variables for a single workflow](/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#defining-environment-variables-for-a-single-workflow).
23+
* To define a configuration variable across multiple workflows, you can define it at the organization, repository, or environment level. For more information, see [Defining configuration variables for multiple workflows](/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#defining-configuration-variables-for-multiple-workflows).
24+
25+
> [!WARNING]
26+
> By default, variables render unmasked in your build outputs. If you need greater security for sensitive information, such as passwords, use secrets instead. For more information, see [AUTOTITLE](/actions/security-for-github-actions/security-guides/about-secrets).
27+
28+
For reference documentation, see [AUTOTITLE](/actions/reference/variables-reference).

content/actions/how-tos/hosting-your-own-runners/managing-self-hosted-runners/running-scripts-before-or-after-a-job.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The following scripting languages are supported:
2727

2828
Your custom scripts can use the following features:
2929

30-
* **Variables:** Scripts have access to the default variables. The full webhook event payload can be found in `GITHUB_EVENT_PATH`. For more information, see [AUTOTITLE](/actions/learn-github-actions/variables#default-environment-variables).
30+
* **Variables:** Scripts have access to the default variables. The full webhook event payload can be found in `GITHUB_EVENT_PATH`. For more information, see [AUTOTITLE](/actions/reference/variables-reference#default-environment-variables).
3131
* **Workflow commands:** Scripts can use workflow commands. For more information, see [AUTOTITLE](/actions/using-workflows/workflow-commands-for-github-actions). Scripts can also use environment files. For more information, see [Environment files](/actions/using-workflows/workflow-commands-for-github-actions#environment-files).
3232

3333
Your script files must use a file extension for the relevant language, such as `.sh` or `.ps1`, in order to run successfully.

content/actions/how-tos/migrating-to-github-actions/manually-migrating-to-github-actions/migrating-from-circleci-to-github-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ For more information about the tools and packages available on {% data variables
6767

6868
CircleCI and {% data variables.product.prodname_actions %} support setting variables in the configuration file and creating secrets using the CircleCI or {% data variables.product.github %} UI.
6969

70-
For more information, see [AUTOTITLE](/actions/learn-github-actions/variables#default-environment-variables) and [AUTOTITLE](/actions/security-guides/using-secrets-in-github-actions).
70+
For more information, see [AUTOTITLE](/actions/reference/variables-reference#default-environment-variables) and [AUTOTITLE](/actions/security-guides/using-secrets-in-github-actions).
7171

7272
## Caching
7373

content/actions/how-tos/migrating-to-github-actions/manually-migrating-to-github-actions/migrating-from-travis-ci-to-github-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Travis CI lets you set variables and share them between stages. Similarly, {% da
5050

5151
### Default variables
5252

53-
Travis CI and {% data variables.product.prodname_actions %} both include default environment variables that you can use in your YAML files. For {% data variables.product.prodname_actions %}, you can see these listed in [AUTOTITLE](/actions/learn-github-actions/variables#default-environment-variables).
53+
Travis CI and {% data variables.product.prodname_actions %} both include default environment variables that you can use in your YAML files. For {% data variables.product.prodname_actions %}, you can see these listed in [AUTOTITLE](/actions/reference/variables-reference#default-environment-variables).
5454

5555
### Parallel job processing
5656

content/actions/how-tos/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ To ensure proper communications for {% data variables.product.github %}-hosted r
231231
| `workspace` | `GITHUB_WORKSPACE` | Actions and shell commands execute in this directory. An action can modify the contents of this directory, which subsequent actions can access. |
232232
| `workflow/event.json` | `GITHUB_EVENT_PATH` | The `POST` payload of the webhook event that triggered the workflow. {% data variables.product.prodname_dotcom %} rewrites this each time an action executes to isolate file content between actions.
233233

234-
For a list of the environment variables {% data variables.product.prodname_dotcom %} creates for each workflow, see [AUTOTITLE](/actions/learn-github-actions/variables#default-environment-variables).
234+
For a list of the environment variables {% data variables.product.prodname_dotcom %} creates for each workflow, see [AUTOTITLE](/actions/reference/variables-reference#default-environment-variables).
235235

236236
### Docker container filesystem
237237

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.