From 614ba962d56aebc1c08cb5eacfe675c2d7b41fa9 Mon Sep 17 00:00:00 2001 From: lcriang <270396390+lcriang@users.noreply.github.com> Date: Fri, 4 Sep 2026 01:47:04 +0800 Subject: [PATCH 1/2] Update contexts.md --- .../workflows-and-actions/contexts.md | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/content/actions/concepts/workflows-and-actions/contexts.md b/content/actions/concepts/workflows-and-actions/contexts.md index 9700745d41da..8b137891791f 100644 --- a/content/actions/concepts/workflows-and-actions/contexts.md +++ b/content/actions/concepts/workflows-and-actions/contexts.md @@ -1,51 +1 @@ ---- -title: Contexts -intro: Learn about contexts in {% data variables.product.prodname_actions %}. -versions: - fpt: '*' - ghes: '*' - ghec: '*' -contentType: concepts -category: - - Write workflows ---- -## About contexts - -{% data reusables.actions.actions-contexts-about-description %} Each context is an object that contains properties, which can be strings or other objects. - -{% data reusables.actions.context-contents %} For example, the `matrix` context is only populated for jobs in a [matrix](/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstrategymatrix). - -You can access contexts using the expression syntax. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/expressions). - -{% raw %} -`${{ }}` -{% endraw %} - -{% data reusables.actions.context-injection-warning %} - -## Determining when to use contexts - -{% data variables.product.prodname_actions %} includes a collection of variables called _contexts_ and a similar collection of variables called _default variables_. These variables are intended for use at different points in the workflow: - -* **Default environment variables:** These environment variables exist only on the runner that is executing your job. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/variables#default-environment-variables). -* **Contexts:** You can use most contexts at any point in your workflow, including when _default variables_ would be unavailable. For example, you can use contexts with expressions to perform initial processing before the job is routed to a runner for execution; this allows you to use a context with the conditional `if` keyword to determine whether a step should run. Once the job is running, you can also retrieve context variables from the runner that is executing the job, such as `runner.os`. For details of where you can use various contexts within a workflow, see [AUTOTITLE](/actions/reference/workflows-and-actions/contexts#context-availability). - -The following example demonstrates how these different types of variables can be used together in a job: - -{% raw %} - -```yaml copy -name: CI -on: push -jobs: - prod-check: - if: ${{ github.ref == 'refs/heads/main' }} - runs-on: ubuntu-latest - steps: - - run: echo "Deploying to production server on branch $GITHUB_REF" -``` - -{% endraw %} - -In this example, the `if` statement checks the [`github.ref`](/actions/reference/workflows-and-actions/contexts#github-context) context to determine the current branch name; if the name is `refs/heads/main`, then the subsequent steps are executed. The `if` check is processed by {% data variables.product.prodname_actions %}, and the job is only sent to the runner if the result is `true`. Once the job is sent to the runner, the step is executed and refers to the [`$GITHUB_REF`](/actions/how-tos/write-workflows/choose-what-workflows-do/use-variables) variable from the runner. From 61f2880819ffede1526ca36b28ca91341d4279b2 Mon Sep 17 00:00:00 2001 From: lcriang <270396390+lcriang@users.noreply.github.com> Date: Fri, 4 Sep 2026 01:48:55 +0800 Subject: [PATCH 2/2] Delete README.md --- README.md | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index f5730b788246..000000000000 --- a/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# GitHub Docs - -Welcome to GitHub Docs! GitHub’s documentation is open source, meaning anyone from inside or outside the company can contribute. For full contributing guidelines, visit our [contributing guide](https://docs.github.com/en/contributing). - - -## Quick links by contributor type - -* **Hubbers (GitHub employees):** See [CONTRIBUTING.md](https://github.com/github/docs-content/blob/main/CONTRIBUTING.md) in the `docs-content` repository for GitHub-specific processes. - -* **Open source contributors:** See [CONTRIBUTING.md](https://github.com/github/docs/blob/main/.github/CONTRIBUTING.md) in the `docs` repository for a quick-start summary. - -## How we sync changes across Docs repositories - -There are two GitHub Docs repositories: - -- **`github/docs`** (public): Open to external contributions - -- **`github/docs-internal`** (private): For GitHub employee contributions. - -The two repositories sync frequently. Content changes in one are reflected in the other. Hubbers might prefer to post in `docs` when working with a customer, but `docs` has limitations on the types of contributions it accepts to safeguard the site and our workflows. Internal contributions should usually go to `docs-internal`. - -**Important:** The `docs` repository accepts contributions to content files (`.md` files in `/content` and select `/data` sections like reusables only). Infrastructure files, workflows, and site-building code are not open for external modification. - -## New to contributing - -Here are some resources to help you get started with open source contributions: - -* [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github) -* [Set up Git](https://docs.github.com/en/get-started/git-basics/set-up-git) -* [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow) -* [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests) - -## License - -This project is dual-licensed under: - -* **Creative Commons Attribution 4.0** - for documentation and content in the assets, content, and data folders (see [LICENSE](LICENSE)) -* **MIT License** - for code (see [LICENSE-CODE](LICENSE-CODE))