From 47b97cae1031971cdae98c00adb15c63c7025f18 Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Tue, 31 Jan 2023 08:13:23 +0100 Subject: [PATCH] Add missing copy button to yaml content --- content/actions/learn-github-actions/variables.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/actions/learn-github-actions/variables.md b/content/actions/learn-github-actions/variables.md index da7b6a46ec..19cbb004fa 100644 --- a/content/actions/learn-github-actions/variables.md +++ b/content/actions/learn-github-actions/variables.md @@ -54,7 +54,7 @@ To set a custom environment variable{% ifversion actions-configuration-variables * A specific step within a job, by using [`jobs..steps[*].env`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsenv). {% raw %} -```yaml +```yaml{:copy} name: Greeting on variable day on: @@ -184,7 +184,7 @@ In addition to runner environment variables, {% data variables.product.prodname_ Runner environment variables are always interpolated on the runner machine. However, parts of a workflow are processed by {% data variables.product.prodname_actions %} and are not sent to the runner. You cannot use environment variables in these parts of a workflow file. Instead, you can use contexts. For example, an `if` conditional, which determines whether a job or step is sent to the runner, is always processed by {% data variables.product.prodname_actions %}. You can use a context in an `if` conditional statement to access the value of an variable. {% raw %} -```yaml +```yaml{:copy} env: DAY_OF_WEEK: Monday @@ -308,7 +308,7 @@ We strongly recommend that actions use variables to access the filesystem rather You can write a single workflow file that can be used for different operating systems by using the `RUNNER_OS` default environment variable and the corresponding context property {% raw %}`${{ runner.os }}`{% endraw %}. For example, the following workflow could be run successfully if you changed the operating system from `macos-latest` to `windows-latest` without having to alter the syntax of the environment variables, which differs depending on the shell being used by the runner. {% raw %} -```yaml +```yaml{:copy} jobs: if-Windows-else: runs-on: macos-latest