From cbb32c592861be2038b354bedaa46b37e93cf389 Mon Sep 17 00:00:00 2001 From: Daniel Compton Date: Tue, 15 Feb 2022 13:33:40 +1300 Subject: [PATCH 1/4] Explain that GITHUB_SHA may not always be the commit that was pushed Fixes https://github.com/github/docs/issues/15302 --- content/actions/learn-github-actions/environment-variables.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/actions/learn-github-actions/environment-variables.md b/content/actions/learn-github-actions/environment-variables.md index 315f0e46a1..09bc1a22b6 100644 --- a/content/actions/learn-github-actions/environment-variables.md +++ b/content/actions/learn-github-actions/environment-variables.md @@ -156,7 +156,7 @@ We strongly recommend that actions use environment variables to access the files | `GITHUB_RUN_ID` | {% data reusables.github-actions.run_id_description %} For example, `1658821493`. | | `GITHUB_RUN_NUMBER` | {% data reusables.github-actions.run_number_description %} For example, `3`. | | `GITHUB_SERVER_URL`| The URL of the {% data variables.product.product_name %} server. For example: `https://{% data variables.product.product_url %}`. -| `GITHUB_SHA` | The commit SHA that triggered the workflow. For example, `ffac537e6cbbf934b08745a378932722df287a53`. | +| `GITHUB_SHA` | The commit SHA that triggered the workflow. The value of this commit depends on the event that triggered the workflow. For more information, see [Events that trigger workflows](/actions/using-workflows/events-that-trigger-workflows). For example, `ffac537e6cbbf934b08745a378932722df287a53`. | | `GITHUB_WORKFLOW` | The name of the workflow. For example, `My test workflow`. If the workflow file doesn't specify a `name`, the value of this variable is the full path of the workflow file in the repository. | | `GITHUB_WORKSPACE` | The default working directory on the runner for steps, and the default location of your repository when using the [`checkout`](https://github.com/actions/checkout) action. For example, `/home/runner/work/my-repo-name/my-repo-name`. | {%- if actions-runner-arch-envvars %} @@ -202,4 +202,4 @@ In this example, the two `if` statements check the `os` property of the `runner` If you generate a value in one step of a job, you can use the value in subsequent steps of the same job by assigning the value to an existing or new environment variable and then writing this to the `GITHUB_ENV` environment file. The environment file can be used directly by an action, or from a shell command in the workflow file by using the `run` keyword. For more information, see "[Workflow commands for {% data variables.product.prodname_actions %}](/actions/reference/workflow-commands-for-github-actions/#setting-an-environment-variable)." If you want to pass a value from a step in one job in a workflow to a step in another job in the workflow, you can define the value as a job output. You can then reference this job output from a step in another job. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idoutputs)." - \ No newline at end of file + From 6798775cd249e145b5d8a1cc0920d89d8c878854 Mon Sep 17 00:00:00 2001 From: Mike Carey <32496966+mike-carey@users.noreply.github.com> Date: Tue, 15 Feb 2022 11:25:33 -0600 Subject: [PATCH 2/4] Update contexts.md --- content/actions/learn-github-actions/contexts.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/actions/learn-github-actions/contexts.md b/content/actions/learn-github-actions/contexts.md index bf23322ffd..649af6fac4 100644 --- a/content/actions/learn-github-actions/contexts.md +++ b/content/actions/learn-github-actions/contexts.md @@ -183,6 +183,7 @@ The `github` context contains information about the workflow run and the event t | `github.action_path` | `string` | The path where an action is located. This property is only supported in composite actions. You can use this path to access files located in the same repository as the action. | | `github.action_ref` | `string` | For a step executing an action, this is the ref of the action being executed. For example, `v2`. | `github.action_repository` | `string` | For a step executing an action, this is the owner and repository name of the action. For example, `actions/checkout`. +| `github.action_status` | `string` | When within a composite action, the current status of the action. | | `github.actor` | `string` | The username of the user that initiated the workflow run. | | `github.api_url` | `string` | The URL of the {% data variables.product.prodname_dotcom %} REST API. | | `github.base_ref` | `string` | The `base_ref` or target branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is either `pull_request` or `pull_request_target`. | From e103e625cff1fb93d087156107bf17d5defebfa5 Mon Sep 17 00:00:00 2001 From: Mike Carey <32496966+mike-carey@users.noreply.github.com> Date: Tue, 15 Feb 2022 11:37:17 -0600 Subject: [PATCH 3/4] Rewords the description --- content/actions/learn-github-actions/contexts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/learn-github-actions/contexts.md b/content/actions/learn-github-actions/contexts.md index 649af6fac4..dbeec8a7c3 100644 --- a/content/actions/learn-github-actions/contexts.md +++ b/content/actions/learn-github-actions/contexts.md @@ -183,7 +183,7 @@ The `github` context contains information about the workflow run and the event t | `github.action_path` | `string` | The path where an action is located. This property is only supported in composite actions. You can use this path to access files located in the same repository as the action. | | `github.action_ref` | `string` | For a step executing an action, this is the ref of the action being executed. For example, `v2`. | `github.action_repository` | `string` | For a step executing an action, this is the owner and repository name of the action. For example, `actions/checkout`. -| `github.action_status` | `string` | When within a composite action, the current status of the action. | +| `github.action_status` | `string` | For a composite action, the current result of the composite action. | | `github.actor` | `string` | The username of the user that initiated the workflow run. | | `github.api_url` | `string` | The URL of the {% data variables.product.prodname_dotcom %} REST API. | | `github.base_ref` | `string` | The `base_ref` or target branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is either `pull_request` or `pull_request_target`. | From 2682eeb7231c3706f468141c05eaae47b0075826 Mon Sep 17 00:00:00 2001 From: Sarah Edwards Date: Wed, 2 Mar 2022 16:35:14 -0800 Subject: [PATCH 4/4] add word --- content/actions/learn-github-actions/environment-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/learn-github-actions/environment-variables.md b/content/actions/learn-github-actions/environment-variables.md index 09bc1a22b6..4a3e2ed9cc 100644 --- a/content/actions/learn-github-actions/environment-variables.md +++ b/content/actions/learn-github-actions/environment-variables.md @@ -156,7 +156,7 @@ We strongly recommend that actions use environment variables to access the files | `GITHUB_RUN_ID` | {% data reusables.github-actions.run_id_description %} For example, `1658821493`. | | `GITHUB_RUN_NUMBER` | {% data reusables.github-actions.run_number_description %} For example, `3`. | | `GITHUB_SERVER_URL`| The URL of the {% data variables.product.product_name %} server. For example: `https://{% data variables.product.product_url %}`. -| `GITHUB_SHA` | The commit SHA that triggered the workflow. The value of this commit depends on the event that triggered the workflow. For more information, see [Events that trigger workflows](/actions/using-workflows/events-that-trigger-workflows). For example, `ffac537e6cbbf934b08745a378932722df287a53`. | +| `GITHUB_SHA` | The commit SHA that triggered the workflow. The value of this commit SHA depends on the event that triggered the workflow. For more information, see [Events that trigger workflows](/actions/using-workflows/events-that-trigger-workflows). For example, `ffac537e6cbbf934b08745a378932722df287a53`. | | `GITHUB_WORKFLOW` | The name of the workflow. For example, `My test workflow`. If the workflow file doesn't specify a `name`, the value of this variable is the full path of the workflow file in the repository. | | `GITHUB_WORKSPACE` | The default working directory on the runner for steps, and the default location of your repository when using the [`checkout`](https://github.com/actions/checkout) action. For example, `/home/runner/work/my-repo-name/my-repo-name`. | {%- if actions-runner-arch-envvars %}