From 45cabd1d85c616473c41e2fe02147818e7776d1a Mon Sep 17 00:00:00 2001 From: Lachlan Heywood Date: Fri, 27 Dec 2024 21:20:38 -0500 Subject: [PATCH 1/4] Update accessing-contextual-information-about-workflow-runs.md --- .../accessing-contextual-information-about-workflow-runs.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md b/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md index af4aa0360ff7..ed5f8145613a 100644 --- a/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md +++ b/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md @@ -206,7 +206,7 @@ The `github` context contains information about the workflow run and the event t | `github.repository_id` | `string` | {% data reusables.actions.repository_id-description %} | | `github.repository_owner` | `string` | The repository owner's username. For example, `octocat`. | | `github.repository_owner_id` | `string` | {% data reusables.actions.repository_owner_id-description %} | -| `github.repositoryUrl` | `string` | The Git URL to the repository. For example, `git://github.com/octocat/hello-world.git`. | +| `github.repositoryUrl` | `string` | The Git URL to the repository. For example, `git://github.com/octocat/hello-world.git`. [(See note below)](./#note-on-github-repositoryUrl-property) | | `github.retention_days` | `string` | The number of days that workflow run logs and artifacts are kept. | | `github.run_id` | `string` | {% data reusables.actions.run_id_description %} | | `github.run_number` | `string` | {% data reusables.actions.run_number_description %} | @@ -288,6 +288,10 @@ jobs: run: echo "Running PR only CI" ``` +### Note on `github.repositoryUrl` property + +The `git://` protocol is disabled for security reasons. You will not be able to use the value of `github.repositoryUrl` to perform any git operations. Instead, you can use `${{ github.serverUrl }}${{ github.repository }}` to give you the HTTP URL for the current repository. + ## `env` context The `env` context contains variables that have been set in a workflow, job, or step. It does not contain variables inherited by the runner process. For more information about setting variables in your workflow, see [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#env). From 404bd367eab9406ad305044e2364a41b99c512c3 Mon Sep 17 00:00:00 2001 From: Lachlan Heywood Date: Fri, 27 Dec 2024 21:27:01 -0500 Subject: [PATCH 2/4] Update content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md --- .../accessing-contextual-information-about-workflow-runs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md b/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md index ed5f8145613a..7e9a7bb3d75c 100644 --- a/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md +++ b/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md @@ -206,7 +206,7 @@ The `github` context contains information about the workflow run and the event t | `github.repository_id` | `string` | {% data reusables.actions.repository_id-description %} | | `github.repository_owner` | `string` | The repository owner's username. For example, `octocat`. | | `github.repository_owner_id` | `string` | {% data reusables.actions.repository_owner_id-description %} | -| `github.repositoryUrl` | `string` | The Git URL to the repository. For example, `git://github.com/octocat/hello-world.git`. [(See note below)](./#note-on-github-repositoryUrl-property) | +| `github.repositoryUrl` | `string` | The Git URL to the repository. For example, `git://github.com/octocat/hello-world.git`. [(See note below)](/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#note-on-github-repositoryUrl-property) | | `github.retention_days` | `string` | The number of days that workflow run logs and artifacts are kept. | | `github.run_id` | `string` | {% data reusables.actions.run_id_description %} | | `github.run_number` | `string` | {% data reusables.actions.run_number_description %} | From ce76d7258b5b0fd5ce1b9beb0af06016b6463e12 Mon Sep 17 00:00:00 2001 From: Lachlan Heywood Date: Fri, 27 Dec 2024 21:33:58 -0500 Subject: [PATCH 3/4] Update accessing-contextual-information-about-workflow-runs.md --- .../accessing-contextual-information-about-workflow-runs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md b/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md index 7e9a7bb3d75c..8f7aabab60a3 100644 --- a/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md +++ b/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md @@ -206,7 +206,7 @@ The `github` context contains information about the workflow run and the event t | `github.repository_id` | `string` | {% data reusables.actions.repository_id-description %} | | `github.repository_owner` | `string` | The repository owner's username. For example, `octocat`. | | `github.repository_owner_id` | `string` | {% data reusables.actions.repository_owner_id-description %} | -| `github.repositoryUrl` | `string` | The Git URL to the repository. For example, `git://github.com/octocat/hello-world.git`. [(See note below)](/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#note-on-github-repositoryUrl-property) | +| `github.repositoryUrl` | `string` | The Git URL to the repository. For example, `git://github.com/octocat/hello-world.git`. [(See note below)](/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#note-on-githubrepositoryurl-property) | | `github.retention_days` | `string` | The number of days that workflow run logs and artifacts are kept. | | `github.run_id` | `string` | {% data reusables.actions.run_id_description %} | | `github.run_number` | `string` | {% data reusables.actions.run_number_description %} | From e5805abe740232b551e991f398d41dadfea3ac58 Mon Sep 17 00:00:00 2001 From: Lachlan Heywood Date: Thu, 2 Jan 2025 12:31:57 -0500 Subject: [PATCH 4/4] Update accessing-contextual-information-about-workflow-runs.md --- .../accessing-contextual-information-about-workflow-runs.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md b/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md index 8f7aabab60a3..985069fab000 100644 --- a/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md +++ b/content/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs.md @@ -206,7 +206,7 @@ The `github` context contains information about the workflow run and the event t | `github.repository_id` | `string` | {% data reusables.actions.repository_id-description %} | | `github.repository_owner` | `string` | The repository owner's username. For example, `octocat`. | | `github.repository_owner_id` | `string` | {% data reusables.actions.repository_owner_id-description %} | -| `github.repositoryUrl` | `string` | The Git URL to the repository. For example, `git://github.com/octocat/hello-world.git`. [(See note below)](/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#note-on-githubrepositoryurl-property) | +| `github.repositoryUrl` | `string` | The Git URL to the repository. For example, `git://github.com/octocat/hello-world.git`. Note: The `git://` protocol has been retired for security reasons. This value should only be used for identification and cannot be used to perform any git operations. Replace with {% raw %}`${{ github.serverUrl }}${{ github.repository }}`{% endraw %} to give you the HTTPS URL for the current repository. | | `github.retention_days` | `string` | The number of days that workflow run logs and artifacts are kept. | | `github.run_id` | `string` | {% data reusables.actions.run_id_description %} | | `github.run_number` | `string` | {% data reusables.actions.run_number_description %} | @@ -288,10 +288,6 @@ jobs: run: echo "Running PR only CI" ``` -### Note on `github.repositoryUrl` property - -The `git://` protocol is disabled for security reasons. You will not be able to use the value of `github.repositoryUrl` to perform any git operations. Instead, you can use `${{ github.serverUrl }}${{ github.repository }}` to give you the HTTP URL for the current repository. - ## `env` context The `env` context contains variables that have been set in a workflow, job, or step. It does not contain variables inherited by the runner process. For more information about setting variables in your workflow, see [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#env).