Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update accessing-contextual-information-about-workflow-runs.md #35780

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)](/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#note-on-githubrepositoryurl-property) |
lachieh marked this conversation as resolved.
Show resolved Hide resolved
| `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 %} |
Expand Down Expand Up @@ -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.

lachieh marked this conversation as resolved.
Show resolved Hide resolved
## `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).
Expand Down
Loading