From e93864362002a180c7ec17eefdb8cb49efea9e40 Mon Sep 17 00:00:00 2001 From: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com> Date: Fri, 24 Sep 2021 06:29:06 +0200 Subject: [PATCH] Add runner name to Actions context and env vars (#10230) Co-authored-by: Lucas Costi --- content/actions/learn-github-actions/contexts.md | 1 + content/actions/learn-github-actions/environment-variables.md | 1 + data/reusables/actions/runner-name-description.md | 1 + 3 files changed, 3 insertions(+) create mode 100644 data/reusables/actions/runner-name-description.md diff --git a/content/actions/learn-github-actions/contexts.md b/content/actions/learn-github-actions/contexts.md index 9c74e0674f..cadf794dd1 100644 --- a/content/actions/learn-github-actions/contexts.md +++ b/content/actions/learn-github-actions/contexts.md @@ -130,6 +130,7 @@ The `runner` context contains information about the runner that is executing the | Property name | Type | Description | |---------------|------|-------------| +| `runner.name` | `string` | {% data reusables.actions.runner-name-description %} | | `runner.os` | `string` | {% data reusables.actions.runner-os-description %} | | `runner.temp` | `string` | {% data reusables.actions.runner-temp-directory-description %} | | `runner.tool_cache` | `string` | {% ifversion ghae %}For instructions on how to make sure your {% data variables.actions.hosted_runner %} has the required software installed, see "[Creating custom images](/actions/using-github-hosted-runners/creating-custom-images)." {% else %} {% data reusables.actions.runner-tool-cache-description %} {% endif %}| diff --git a/content/actions/learn-github-actions/environment-variables.md b/content/actions/learn-github-actions/environment-variables.md index 33bb592aea..4447dfac9e 100644 --- a/content/actions/learn-github-actions/environment-variables.md +++ b/content/actions/learn-github-actions/environment-variables.md @@ -73,6 +73,7 @@ We strongly recommend that actions use environment variables to access the files | `GITHUB_SERVER_URL`| Returns the URL of the {% data variables.product.product_name %} server. For example: `https://{% data variables.product.product_url %}`. | `GITHUB_API_URL` | Returns the API URL. For example: `{% data variables.product.api_url_code %}`. | `GITHUB_GRAPHQL_URL` | Returns the GraphQL API URL. For example: `{% data variables.product.graphql_url_code %}`. +| `RUNNER_NAME` | {% data reusables.actions.runner-name-description %} | `RUNNER_OS` | {% data reusables.actions.runner-os-description %} | `RUNNER_TEMP` | {% data reusables.actions.runner-temp-directory-description %} {% ifversion not ghae %}| `RUNNER_TOOL_CACHE` | {% data reusables.actions.runner-tool-cache-description %}{% endif %} diff --git a/data/reusables/actions/runner-name-description.md b/data/reusables/actions/runner-name-description.md new file mode 100644 index 0000000000..c3955e46ec --- /dev/null +++ b/data/reusables/actions/runner-name-description.md @@ -0,0 +1 @@ +The name of the runner executing the job.