diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1cbbff45705a..1fad6d5d1194 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,7 @@ registries: type: docker-registry url: ghcr.io username: PAT - password: ${{secrets.CONTAINER_BUILDER_TOKEN}} + password: ${{secrets.BASE_CONTAINER_IMAGE_READER_DEPENDABOT}} updates: - package-ecosystem: npm diff --git a/Dockerfile b/Dockerfile index d721a58d3e73..d3a34d67428f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ # --------------------------------------------------------------- # To update the sha: # https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble -FROM ghcr.io/github/gh-base-image/gh-base-noble:20250709-201453-g6a417ef5f AS base +FROM ghcr.io/github/gh-base-image/gh-base-noble:20250711-151843-g9ff1d29c5 AS base # Install curl for Node install and determining the early access branch # Install git for cloning docs-early-access & translations repos diff --git a/content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/using-environments-for-deployment.md b/content/actions/concepts/workflows-and-actions/deployment-environments.md similarity index 54% rename from content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/using-environments-for-deployment.md rename to content/actions/concepts/workflows-and-actions/deployment-environments.md index f8151e40784a..70c4bd56667b 100644 --- a/content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/using-environments-for-deployment.md +++ b/content/actions/concepts/workflows-and-actions/deployment-environments.md @@ -1,27 +1,18 @@ --- -title: Using environments for deployment -shortTitle: Environments -intro: Specify a deployment environment in your workflow. +title: Deployment environments +intro: 'You can create and deploy to different environments.' versions: fpt: '*' ghes: '*' ghec: '*' -redirect_from: - - /actions/using-jobs/using-environments-for-jobs - - /actions/using-jobs/using-environments-for-deployment - - /actions/writing-workflows/choosing-what-your-workflow-does/using-environments-for-deployment +type: overview +topics: + - Actions + - Workflows --- - -{% data reusables.actions.enterprise-github-hosted-runners %} - -## About environments {% data reusables.actions.about-environments %} Each job in a workflow can reference a single environment. Any protection rules configured for the environment must pass before a job referencing the environment is sent to a runner. The job can access the environment's secrets only after the job is sent to a runner. When a workflow references an environment, the environment will appear in the repository's deployments. For more information about viewing current and previous deployments, see [AUTOTITLE](/actions/deployment/managing-your-deployments/viewing-deployment-history). - -## Using an environment in a workflow - -{% data reusables.actions.environment-example %} diff --git a/content/actions/concepts/workflows-and-actions/index.md b/content/actions/concepts/workflows-and-actions/index.md index 22ff6eb4b294..866b1d0fd0ec 100644 --- a/content/actions/concepts/workflows-and-actions/index.md +++ b/content/actions/concepts/workflows-and-actions/index.md @@ -13,6 +13,8 @@ children: - /about-custom-actions - /contexts - /expressions + - /deployment-environments + - /workflow-artifacts - /dependency-caching - /about-monitoring-workflows - /notifications-for-workflow-runs diff --git a/content/actions/concepts/workflows-and-actions/workflow-artifacts.md b/content/actions/concepts/workflows-and-actions/workflow-artifacts.md new file mode 100644 index 000000000000..e37ef12dcaf9 --- /dev/null +++ b/content/actions/concepts/workflows-and-actions/workflow-artifacts.md @@ -0,0 +1,43 @@ +--- +title: Workflow artifacts +intro: 'Learn about storing and sharing data as artifacts of {% data variables.product.prodname_actions %} workflows.' +versions: + fpt: '*' + ghes: '*' + ghec: '*' +type: overview +topics: + - Actions + - Workflows +--- + +## About workflow artifacts + +An artifact is a file or collection of files produced during a workflow run. Artifacts allow you to persist data after a job has completed, and share that data with another job in the same workflow. For example, you can use artifacts to save your build and test output after a workflow run has ended. + +{% data variables.product.github %} provides two actions that you can use to upload and download build artifacts, {% ifversion fpt or ghec %}[upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact){% else %} `upload-artifact` and `download-artifact` on {% data variables.product.prodname_ghe_server %}{% endif %}. + +Common artifacts include: + +* Log files and core dumps +* Test results, failures, and screenshots +* Binary or compressed files +* Stress test performance output and code coverage results + +{% data reusables.actions.comparing-artifacts-caching %} + +For more information on dependency caching, see [AUTOTITLE](/actions/using-workflows/caching-dependencies-to-speed-up-workflows#comparing-artifacts-and-dependency-caching). + +{% ifversion artifact-attestations %} + +## Generating artifact attestations for builds + +{% data reusables.actions.about-artifact-attestations %} + +You can access attestations after a build run, underneath the list of the artifacts the build produced. + +For more information, see [AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + +{% endif %} + +{% data reusables.actions.artifacts.artifacts-from-deleted-workflow-runs %} diff --git a/content/actions/how-tos/use-cases-and-examples/index.md b/content/actions/how-tos/use-cases-and-examples/index.md index 31a6e86ab015..471c207e86b4 100644 --- a/content/actions/how-tos/use-cases-and-examples/index.md +++ b/content/actions/how-tos/use-cases-and-examples/index.md @@ -10,7 +10,6 @@ redirect_from: - /actions/examples - /actions/use-cases-and-examples children: - - building-and-testing - publishing-packages - project-management - using-containerized-services diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-go.md b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-go.md similarity index 97% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-go.md rename to content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-go.md index 910b8f48c3d7..e1d93a87135f 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-go.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-go.md @@ -1,17 +1,17 @@ --- title: Building and testing Go -intro: You can create a continuous integration (CI) workflow to build and test your Go project. +intro: Learn how to create a continuous integration (CI) workflow to build and test your Go project. versions: fpt: '*' ghes: '*' ghec: '*' -type: tutorial topics: - CI shortTitle: Build & test Go redirect_from: - /actions/automating-builds-and-tests/building-and-testing-go - /actions/use-cases-and-examples/building-and-testing/building-and-testing-go + - /actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-go --- {% data reusables.actions.enterprise-github-hosted-runners %} diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-java-with-ant.md b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-java-with-ant.md similarity index 97% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-java-with-ant.md rename to content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-java-with-ant.md index fb0dd0ab6b9e..ff4afe15b20f 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-java-with-ant.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-java-with-ant.md @@ -1,6 +1,6 @@ --- title: Building and testing Java with Ant -intro: You can create a continuous integration (CI) workflow in GitHub Actions to build and test your Java project with Ant. +intro: Learn how to create a continuous integration (CI) workflow in GitHub Actions to build and test your Java project with Ant. redirect_from: - /actions/language-and-framework-guides/building-and-testing-java-with-ant - /actions/guides/building-and-testing-java-with-ant @@ -10,7 +10,6 @@ versions: fpt: '*' ghes: '*' ghec: '*' -type: tutorial topics: - CI - Java diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-java-with-gradle.md b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-java-with-gradle.md similarity index 96% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-java-with-gradle.md rename to content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-java-with-gradle.md index 7562345edcd4..ba00ebb39583 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-java-with-gradle.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-java-with-gradle.md @@ -1,16 +1,16 @@ --- title: Building and testing Java with Gradle -intro: You can create a continuous integration (CI) workflow in GitHub Actions to build and test your Java project with Gradle. +intro: Learn how to create a continuous integration (CI) workflow in GitHub Actions to build and test your Java project with Gradle. redirect_from: - /actions/language-and-framework-guides/building-and-testing-java-with-gradle - /actions/guides/building-and-testing-java-with-gradle - /actions/automating-builds-and-tests/building-and-testing-java-with-gradle - /actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-gradle + - /actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-java-with-gradle versions: fpt: '*' ghes: '*' ghec: '*' -type: tutorial topics: - CI - Java diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven.md b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-java-with-maven.md similarity index 96% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven.md rename to content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-java-with-maven.md index 3fdfbdc91fbd..643fd5f11670 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-java-with-maven.md @@ -1,16 +1,16 @@ --- title: Building and testing Java with Maven -intro: You can create a continuous integration (CI) workflow in GitHub Actions to build and test your Java project with Maven. +intro: Learn how to create a continuous integration (CI) workflow in GitHub Actions to build and test your Java project with Maven. redirect_from: - /actions/language-and-framework-guides/building-and-testing-java-with-maven - /actions/guides/building-and-testing-java-with-maven - /actions/automating-builds-and-tests/building-and-testing-java-with-maven - /actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven + - /actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven versions: fpt: '*' ghes: '*' ghec: '*' -type: tutorial topics: - CI - Java diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-net.md b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-net.md similarity index 98% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-net.md rename to content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-net.md index 555916e8363b..399b1cdbc7d3 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-net.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-net.md @@ -1,10 +1,11 @@ --- title: Building and testing .NET -intro: You can create a continuous integration (CI) workflow to build and test your .NET project. +intro: Learn how to create a continuous integration (CI) workflow to build and test your .NET project. redirect_from: - /actions/guides/building-and-testing-net - /actions/automating-builds-and-tests/building-and-testing-net - /actions/use-cases-and-examples/building-and-testing/building-and-testing-net + - /actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-net versions: fpt: '*' ghes: '*' diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-nodejs.md b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-nodejs.md similarity index 98% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-nodejs.md rename to content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-nodejs.md index 0c21401daa8b..b0ffeda07825 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-nodejs.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-nodejs.md @@ -1,17 +1,17 @@ --- title: Building and testing Node.js -intro: You can create a continuous integration (CI) workflow to build and test your Node.js project. +intro: Learn how to create a continuous integration (CI) workflow to build and test your Node.js project. redirect_from: - /actions/automating-your-workflow-with-github-actions/using-nodejs-with-github-actions - /actions/language-and-framework-guides/using-nodejs-with-github-actions - /actions/guides/building-and-testing-nodejs - /actions/automating-builds-and-tests/building-and-testing-nodejs - /actions/use-cases-and-examples/building-and-testing/building-and-testing-nodejs + - /actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-nodejs versions: fpt: '*' ghes: '*' ghec: '*' -type: tutorial topics: - CI - Node diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-powershell.md b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-powershell.md similarity index 98% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-powershell.md rename to content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-powershell.md index 4f38d926ab53..d6167d91b5f1 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-powershell.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-powershell.md @@ -1,17 +1,18 @@ --- title: Building and testing PowerShell -intro: You can create a continuous integration (CI) workflow to build and test your PowerShell project. +intro: Learn how to create a continuous integration (CI) workflow to build and test your PowerShell project. redirect_from: - /actions/guides/building-and-testing-powershell - /actions/automating-builds-and-tests/building-and-testing-powershell - /actions/use-cases-and-examples/building-and-testing/building-and-testing-powershell + - /actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-powershell versions: fpt: '*' ghes: '*' ghec: '*' authors: - potatoqualitee -type: tutorial + topics: - CI - PowerShell diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-python.md b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-python.md similarity index 99% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-python.md rename to content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-python.md index 272e4b9d5fb4..04d28054691c 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-python.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-python.md @@ -1,17 +1,17 @@ --- title: Building and testing Python -intro: You can create a continuous integration (CI) workflow to build and test your Python project. +intro: Learn how to create a continuous integration (CI) workflow to build and test your Python project. redirect_from: - /actions/automating-your-workflow-with-github-actions/using-python-with-github-actions - /actions/language-and-framework-guides/using-python-with-github-actions - /actions/guides/building-and-testing-python - /actions/automating-builds-and-tests/building-and-testing-python - /actions/use-cases-and-examples/building-and-testing/building-and-testing-python + - /actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-python versions: fpt: '*' ghes: '*' ghec: '*' -type: tutorial topics: - CI - Python diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-ruby.md b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-ruby.md similarity index 99% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-ruby.md rename to content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-ruby.md index c730c74dc3f6..55edde99fc6e 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-ruby.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-ruby.md @@ -5,11 +5,11 @@ redirect_from: - /actions/guides/building-and-testing-ruby - /actions/automating-builds-and-tests/building-and-testing-ruby - /actions/use-cases-and-examples/building-and-testing/building-and-testing-ruby + - /actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-ruby versions: fpt: '*' ghes: '*' ghec: '*' -type: tutorial topics: - CI - Ruby diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-rust.md b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-rust.md similarity index 97% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-rust.md rename to content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-rust.md index 7a770717423e..81dbe26335d8 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-rust.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-rust.md @@ -1,16 +1,16 @@ --- title: Building and testing Rust -intro: You can create a continuous integration (CI) workflow to build and test your Rust project. +intro: Learn how to create a continuous integration (CI) workflow to build and test your Rust project. versions: fpt: '*' ghec: '*' ghes: '*' -type: tutorial topics: - CI shortTitle: Build & test Rust redirect_from: - /actions/use-cases-and-examples/building-and-testing/building-and-testing-rust + - /actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-rust --- {% data reusables.actions.enterprise-github-hosted-runners %} diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-swift.md b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-swift.md similarity index 96% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-swift.md rename to content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-swift.md index ada22c274137..480f72cb10ba 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-swift.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-swift.md @@ -1,15 +1,15 @@ --- title: Building and testing Swift -intro: You can create a continuous integration (CI) workflow to build and test your Swift project. +intro: Learn how to create a continuous integration (CI) workflow to build and test your Swift project. redirect_from: - /actions/guides/building-and-testing-swift - /actions/automating-builds-and-tests/building-and-testing-swift - /actions/use-cases-and-examples/building-and-testing/building-and-testing-swift + - /actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-swift versions: fpt: '*' ghes: '*' ghec: '*' -type: tutorial topics: - CI - Swift diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-xamarin-applications.md b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-xamarin-applications.md similarity index 94% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-xamarin-applications.md rename to content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-xamarin-applications.md index 427cd67c6067..364ff4d9bb06 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-xamarin-applications.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/building-and-testing-xamarin-applications.md @@ -1,15 +1,15 @@ --- title: Building and testing Xamarin applications -intro: You can create a continuous integration (CI) workflow in GitHub Actions to build and test your Xamarin application. +intro: Learn how to create a continuous integration (CI) workflow in GitHub Actions to build and test your Xamarin application. redirect_from: - /actions/guides/building-and-testing-xamarin-applications - /actions/automating-builds-and-tests/building-and-testing-xamarin-applications - /actions/use-cases-and-examples/building-and-testing/building-and-testing-xamarin-applications + - /actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-xamarin-applications versions: fpt: '*' ghes: '*' ghec: '*' -type: tutorial topics: - CI - Xamarin diff --git a/content/actions/how-tos/use-cases-and-examples/building-and-testing/index.md b/content/actions/how-tos/writing-workflows/building-and-testing/index.md similarity index 95% rename from content/actions/how-tos/use-cases-and-examples/building-and-testing/index.md rename to content/actions/how-tos/writing-workflows/building-and-testing/index.md index 3267d65f91c8..7b6d1dabe6ec 100644 --- a/content/actions/how-tos/use-cases-and-examples/building-and-testing/index.md +++ b/content/actions/how-tos/writing-workflows/building-and-testing/index.md @@ -18,6 +18,7 @@ redirect_from: - /actions/automating-builds-and-tests - /actions/examples/using-scripts-to-test-your-code-on-a-runner - /actions/use-cases-and-examples/building-and-testing + - /actions/how-tos/use-cases-and-examples/building-and-testing children: - /building-and-testing-go - /building-and-testing-java-with-ant diff --git a/content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/deploying-to-a-specific-environment.md b/content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/deploying-to-a-specific-environment.md new file mode 100644 index 000000000000..c61b07c0de5f --- /dev/null +++ b/content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/deploying-to-a-specific-environment.md @@ -0,0 +1,44 @@ +--- +title: Deploying to a specific environment +shortTitle: Deploy to environment +intro: Specify a deployment environment in your workflow. +versions: + fpt: '*' + ghes: '*' + ghec: '*' +redirect_from: + - /actions/using-jobs/using-environments-for-jobs + - /actions/using-jobs/using-environments-for-deployment + - /actions/writing-workflows/choosing-what-your-workflow-does/using-environments-for-deployment + - /actions/how-tos/writing-workflows/choosing-what-your-workflow-does/using-environments-for-deployment +--- + +## Prerequisites + +You need to create an environment before you can use it in a workflow. See [AUTOTITLE](/actions/how-tos/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment#creating-an-environment). + +## Using an environment in a workflow + +1. Open the workflow file you want to edit. +1. Use the following syntax to add a [`jobs..environment`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idenvironment) key to your workflow: + + ```yaml copy + jobs: + JOB-ID: + environment: ENVIRONMENT-NAME + ``` + + The chosen job will now be subject to any rules configured for the specified environment. +1. Optionally, specify a deployment URL for the environment using the following syntax: + + ```yaml copy + jobs: + JOB-ID: + environment: ENVIRONMENT-NAME + url: URL + ``` + + The specified URL will appear: + * On the deployments page for the repository + * In the visualization graph for the workflow run + * (If a pull request triggers the workflow) As a "View deployment" button in the pull request timeline diff --git a/content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/index.md b/content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/index.md index 93bea44eef14..cbf061dfc564 100644 --- a/content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/index.md +++ b/content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/index.md @@ -18,8 +18,7 @@ children: - /store-information-in-variables - /passing-information-between-jobs - /setting-a-default-shell-and-working-directory - - /using-environments-for-deployment + - /deploying-to-a-specific-environment - /control-the-concurrency-of-workflows-and-jobs - /running-variations-of-jobs-in-a-workflow - - /storing-and-sharing-data-from-a-workflow --- diff --git a/content/actions/how-tos/writing-workflows/index.md b/content/actions/how-tos/writing-workflows/index.md index a17caee31301..662a58771bd3 100644 --- a/content/actions/how-tos/writing-workflows/index.md +++ b/content/actions/how-tos/writing-workflows/index.md @@ -15,5 +15,6 @@ children: - /choosing-when-your-workflow-runs - /choosing-where-your-workflow-runs - /choosing-what-your-workflow-does + - /building-and-testing --- diff --git a/content/actions/index.md b/content/actions/index.md index 1e192f0233fe..b7975d9bcab9 100644 --- a/content/actions/index.md +++ b/content/actions/index.md @@ -16,7 +16,7 @@ featuredLinks: guideCards: - /actions/how-tos/writing-workflows/using-workflow-templates - /actions/how-tos/use-cases-and-examples/publishing-packages/publishing-nodejs-packages - - /actions/how-tos/use-cases-and-examples/building-and-testing/building-and-testing-powershell + - /actions/how-tos/writing-workflows/building-and-testing/building-and-testing-powershell popular: - /actions/reference/workflow-syntax-for-github-actions - /actions/how-tos/writing-workflows diff --git a/content/actions/tutorials/index.md b/content/actions/tutorials/index.md index ac43e10c40e8..9fd47be92f36 100644 --- a/content/actions/tutorials/index.md +++ b/content/actions/tutorials/index.md @@ -12,10 +12,10 @@ children: - /creating-a-docker-container-action - /creating-a-javascript-action - /creating-a-composite-action + - /store-and-share-data - /quickstart-for-actions-runner-controller - /deploying-with-github-actions - /communicating-with-docker-service-containers redirect_from: - /actions/guides --- - diff --git a/content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow.md b/content/actions/tutorials/store-and-share-data.md similarity index 68% rename from content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow.md rename to content/actions/tutorials/store-and-share-data.md index be2f2d48855f..507711561c2c 100644 --- a/content/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow.md +++ b/content/actions/tutorials/store-and-share-data.md @@ -1,7 +1,7 @@ --- -title: Storing and sharing data from a workflow -shortTitle: Store artifacts -intro: Artifacts allow you to share data between jobs in a workflow and store data once that workflow has completed. +title: Store and share data with workflow artifacts +shortTitle: Store and share data +intro: Use artifacts to share data between jobs in a workflow and store data once that workflow has completed. redirect_from: - /articles/persisting-workflow-data-using-artifacts - /github/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts @@ -12,6 +12,7 @@ redirect_from: - /actions/using-workflows/storing-workflow-data-as-artifacts - /actions/writing-workflows/choosing-what-your-workflow-does/storing-workflow-data-as-artifacts - /actions/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow + - /actions/how-tos/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow versions: fpt: '*' ghes: '*' @@ -19,52 +20,15 @@ versions: type: tutorial topics: - Workflows +allowTitleToDifferFromFilename: true --- -{% data reusables.actions.enterprise-github-hosted-runners %} +## Prerequisites -## About workflow artifacts - -Artifacts allow you to persist data after a job has completed, and share that data with another job in the same workflow. An artifact is a file or collection of files produced during a workflow run. For example, you can use artifacts to save your build and test output after a workflow run has ended. {% data reusables.actions.reusable-workflow-artifacts %} - -{% data reusables.actions.artifact-log-retention-statement %} The retention period for a pull request restarts each time someone pushes a new commit to the pull request. - -These are some of the common artifacts that you can upload: - -* Log files and core dumps -* Test results, failures, and screenshots -* Binary or compressed files -* Stress test performance output and code coverage results - -{% ifversion fpt or ghec %} - -Storing artifacts uses storage space on {% data variables.product.github %}. {% data reusables.actions.actions-billing %} For more information, see [AUTOTITLE](/billing/managing-billing-for-github-actions). - -{% else %} - -Artifacts consume storage space on the external blob storage that is configured for {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_server %}. - -{% endif %} - -Artifacts are uploaded during a workflow run, and you can view an artifact's name and size in the UI. When an artifact is downloaded using the {% data variables.product.github %} UI, all files that were individually uploaded as part of the artifact get zipped together into a single file. This means that billing is calculated based on the size of the uploaded artifact and not the size of the zip file. - -{% data variables.product.github %} provides two actions that you can use to upload and download build artifacts. For more information, see the {% ifversion fpt or ghec %}[upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact) actions{% else %} `upload-artifact` and `download-artifact` actions on {% data variables.product.prodname_ghe_server %}{% endif %}. - -To share data between jobs: - -* **Uploading files:** Give the uploaded file a name and upload the data before the job ends. -* **Downloading files:** You can only download artifacts that were uploaded during the same workflow run. When you download a file, you can reference it by name. - -The steps of a job share the same environment on the runner machine, but run in their own individual processes. To pass data between steps in a job, you can use inputs and outputs. For more information about inputs and outputs, see [AUTOTITLE](/actions/creating-actions/metadata-syntax-for-github-actions). - -{% data reusables.actions.comparing-artifacts-caching %} - -For more information on dependency caching, see [AUTOTITLE](/actions/using-workflows/caching-dependencies-to-speed-up-workflows#comparing-artifacts-and-dependency-caching). +Before you can complete this tutorial, you need to understand workflow artifacts. See [AUTOTITLE](/actions/concepts/workflows-and-actions/workflow-artifacts). ## Uploading build and test artifacts -You can create a continuous integration (CI) workflow to build and test your code. For more information about using {% data variables.product.prodname_actions %} to perform CI, see [AUTOTITLE](/actions/automating-builds-and-tests/about-continuous-integration). - The output of building and testing your code often produces files you can use to debug test failures and production code that you can deploy. You can configure a workflow to build and test the code pushed to your repository and report a success or failure status. You can upload the build and test output to use for deployments, debugging failed tests or crashes, and viewing test suite coverage. You can use the `upload-artifact` action to upload artifacts. When uploading an artifact, you can specify a single file or directory, or multiple files or directories. You can also exclude certain files or directories, and use wildcard patterns. We recommend that you provide a name for an artifact, but if no name is provided then `artifact` will be used as the default name. For more information on syntax, see the {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) action{% else %} `actions/upload-artifact` action on {% data variables.product.prodname_ghe_server %}{% endif %}. @@ -119,18 +83,6 @@ jobs: path: output/test/code-coverage.html ``` -{% ifversion artifact-attestations %} - -## Generating artifact attestations for builds - -{% data reusables.actions.about-artifact-attestations %} - -You can access attestations after a build run, underneath the list of the artifacts the build produced. - -For more information, see [AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). - -{% endif %} - ## Configuring a custom artifact retention period You can define a custom retention period for individual artifacts created by a workflow. When using a workflow to create a new artifact, you can use `retention-days` with the `upload-artifact` action. This example demonstrates how to set a custom retention period of 5 days for the artifact named `my-artifact`: @@ -146,15 +98,9 @@ You can define a custom retention period for individual artifacts created by a w The `retention-days` value cannot exceed the retention limit set by the repository, organization, or enterprise. -## Downloading or deleting artifacts - -During a workflow run, you can use the [`download-artifact`](https://github.com/actions/download-artifact) action to download artifacts that were previously uploaded in the same workflow run. - -After a workflow run has been completed, you can download or delete artifacts on {% data variables.product.prodname_dotcom %} or using the REST API. For more information, see [AUTOTITLE](/actions/managing-workflow-runs/downloading-workflow-artifacts), [AUTOTITLE](/actions/managing-workflow-runs/removing-workflow-artifacts), and [AUTOTITLE](/rest/actions/artifacts). - -### Downloading artifacts during a workflow run +## Downloading artifacts during a workflow run -The [`actions/download-artifact`](https://github.com/actions/download-artifact) action can be used to download previously uploaded artifacts during a workflow run. +You can use the [`actions/download-artifact`](https://github.com/actions/download-artifact) action to download previously uploaded artifacts during a workflow run. > [!NOTE] > {% ifversion fpt or ghec %}If you want to download artifacts from a different workflow or workflow run, you need to supply a token and run identifier. See [Download Artifacts from other Workflow Runs or Repositories](https://github.com/actions/download-artifact?tab=readme-ov-file#download-artifacts-from-other-workflow-runs-or-repositories) in the documentation for the `download-artifact` action. @@ -180,20 +126,6 @@ If you download all workflow run's artifacts, a directory for each artifact is c For more information on syntax, see the {% ifversion fpt or ghec %}[actions/download-artifact](https://github.com/actions/download-artifact) action{% else %} `actions/download-artifact` action on {% data variables.product.prodname_ghe_server %}{% endif %}. -{% ifversion fpt or ghec %} - -## Validating artifacts - -Every time the upload-artifact action is used it returns an output called `digest`. This is a SHA256 digest of the Artifact you uploaded during a workflow run. - -When the download-artifact action is then used to download that artifact, it automatically calculates the digest for that downloaded artifact and validates that it matches the output from the upload-artifact step. - -If the digest does not match, the run will display a warning in the UI and in the job logs. - -To view the SHA256 digest you can open the logs for the upload-artifact job or check in the Artifact output that appears in the workflow run UI. - -{% endif %} - ## Passing data between jobs in a workflow You can use the `upload-artifact` and `download-artifact` actions to share data between jobs in a workflow. This example workflow illustrates how to pass data between jobs in the same workflow. For more information, see the {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact) actions{% else %} `actions/upload-artifact` and `download-artifact` actions on {% data variables.product.prodname_ghe_server %}{% endif %}. @@ -271,12 +203,16 @@ jobs: The workflow run will archive any artifacts that it generated. For more information on downloading archived artifacts, see [AUTOTITLE](/actions/managing-workflow-runs/downloading-workflow-artifacts). -{% data reusables.actions.artifacts.artifacts-from-deleted-workflow-runs %} - {% ifversion fpt or ghec %} -## Further reading +## Validating artifacts + +Every time the upload-artifact action is used it returns an output called `digest`. This is a SHA256 digest of the Artifact you uploaded during a workflow run. + +When the download-artifact action is then used to download that artifact, it automatically calculates the digest for that downloaded artifact and validates that it matches the output from the upload-artifact step. + +If the digest does not match, the run will display a warning in the UI and in the job logs. -* [AUTOTITLE](/billing/managing-billing-for-github-actions). +To view the SHA256 digest, open the logs for the upload-artifact job or check in the Artifact output that appears in the workflow run UI. {% endif %} diff --git a/content/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment.md b/content/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment.md index 9f0d16386540..178824fd2b6e 100644 --- a/content/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment.md +++ b/content/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment.md @@ -74,7 +74,7 @@ For example, to enable Japanese and Portuguese in addition to English, you can e > [!NOTE] > Before you commit your changes, you should revert the `package.json` file to its original state. -The supported language codes are defined in [`src/languages/lib/languages.js`](https://github.com/github/docs/blob/main/src/languages/lib/languages.js). +The supported language codes are defined in [`src/languages/lib/languages.ts`](https://github.com/github/docs/blob/main/src/languages/lib/languages.ts). ## Using {% data variables.product.prodname_github_codespaces %} diff --git a/content/contributing/writing-for-github-docs/configuring-redirects.md b/content/contributing/writing-for-github-docs/configuring-redirects.md index 9036cd4f3d4f..03c3810c6a8b 100644 --- a/content/contributing/writing-for-github-docs/configuring-redirects.md +++ b/content/contributing/writing-for-github-docs/configuring-redirects.md @@ -38,7 +38,7 @@ See [`redirect_from`](https://github.com/github/docs/blob/main/content/README.md If a URL for a page is entered without a version (`https://docs.github.com/ARTICLE` instead of `https://docs.github.com/VERSION/ARTICLE`), the site will automatically redirect it to the first available version of the page. -The order of precedence is specified in [`lib/all-versions.js`](https://github.com/github/docs/blob/main/src/versions/lib/all-versions.js). The current order of precedence is: +The order of precedence is specified in [`lib/all-versions.ts`](https://github.com/github/docs/blob/main/src/versions/lib/all-versions.ts). The current order of precedence is: 1. {% data variables.product.prodname_free_team %}, {% data variables.product.prodname_pro %}, or {% data variables.product.prodname_team %} (`fpt`) 1. {% data variables.product.prodname_ghe_cloud %} (`ghec`) diff --git a/content/contributing/writing-for-github-docs/using-yaml-frontmatter.md b/content/contributing/writing-for-github-docs/using-yaml-frontmatter.md index 33edfed2f65f..59fcf89afd41 100644 --- a/content/contributing/writing-for-github-docs/using-yaml-frontmatter.md +++ b/content/contributing/writing-for-github-docs/using-yaml-frontmatter.md @@ -46,7 +46,7 @@ For more information, see [`lib/frontmatter.js`](https://github.com/github/docs/ ### `versions` -* Purpose: Indicates the [versions](https://github.com/github/docs/blob/main/src/versions/lib/all-versions.js) to which a page applies. +* Purpose: Indicates the [versions](https://github.com/github/docs/blob/main/src/versions/lib/all-versions.ts) to which a page applies. For more information about the different types of versioning, see [Versioning documentation](/contributing/syntax-and-versioning-for-github-docs/versioning-documentation). * Type: `Object`. Allowable keys map to product names and can be found in the `versions` object in [`lib/frontmatter.js`](https://github.com/github/docs/blob/main/src/frame/lib/frontmatter.js). * This frontmatter value is currently **required** for all pages. diff --git a/content/copilot/get-started/github-copilot-features.md b/content/copilot/get-started/github-copilot-features.md index 337da2978722..c0caf0037053 100644 --- a/content/copilot/get-started/github-copilot-features.md +++ b/content/copilot/get-started/github-copilot-features.md @@ -57,7 +57,7 @@ AI-generated text completion to help you write pull request descriptions quickly Enhance {% data variables.copilot.copilot_chat_short %} responses by providing contextual details on your preferences, tools, and requirements. See [AUTOTITLE](/copilot/customizing-copilot/about-customizing-github-copilot-chat-responses). -### {% data variables.copilot.copilot_desktop_short %} ({% data variables.release-phases.public_preview %}) +### {% data variables.copilot.copilot_desktop_short %} Automatically generate commit messages and descriptions with {% data variables.copilot.copilot_desktop_short %} based on the changes you make to your project. diff --git a/content/copilot/how-tos/administer/enterprises/managing-policies-and-features-for-copilot-in-your-enterprise.md b/content/copilot/how-tos/administer/enterprises/managing-policies-and-features-for-copilot-in-your-enterprise.md index 854fab8e7ee9..e87204c5ceb9 100644 --- a/content/copilot/how-tos/administer/enterprises/managing-policies-and-features-for-copilot-in-your-enterprise.md +++ b/content/copilot/how-tos/administer/enterprises/managing-policies-and-features-for-copilot-in-your-enterprise.md @@ -30,7 +30,7 @@ You can configure policies for your enterprise. If no policy is chosen at the en | ----------- | ------------------------------------------ | | [{% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_dotcom_the_website %}](#copilot-in-githubcom) | least restrictive | | [{% data variables.copilot.copilot_cli %}](#github-copilot-in-the-cli) | least restrictive | -| [{% data variables.copilot.copilot_desktop_short %} ({% data variables.release-phases.public_preview %})](#copilot-in-github-desktop-public-preview) | least restrictive | +| [{% data variables.copilot.copilot_desktop_short %}](#copilot-in-github-desktop) | least restrictive | | [{% data variables.copilot.copilot_chat %} in the IDE](#github-copilot-chat-in-the-ide) | least restrictive | | [Editor preview features](#editor-preview-features) | least restrictive | | [{% data variables.copilot.copilot_mobile %}](#github-copilot-chat-in-github-mobile) | least restrictive | @@ -40,7 +40,7 @@ You can configure policies for your enterprise. If no policy is chosen at the en | [{% data variables.product.prodname_copilot_short %} access to alternative AI models](#copilot-access-to-alternative-ai-models) | least restrictive | | [{% data variables.product.prodname_copilot_short %} Metrics API access](#copilot-metrics-api-access) | most restrictive | | [{% data variables.copilot.copilot_coding_agent %}](#copilot-coding-agent) | least restrictive | -| [MCP servers on {% data variables.product.prodname_dotcom_the_website %}](#mcp-servers-on-githubcom) | least restrictive | +| [MCP servers in {% data variables.product.prodname_copilot_short %}](#mcp-servers-in-copilot) | least restrictive | ### {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_dotcom_the_website %} @@ -57,7 +57,7 @@ If you enable "{% data variables.product.prodname_copilot_short %} in {% data va {% data variables.copilot.copilot_cli %} is an extension for {% data variables.product.prodname_cli %} which provides a chat-like interface in the terminal. You can ask {% data variables.product.prodname_copilot %} for command suggestions, or for explanations of commands they run. -### {% data variables.copilot.copilot_desktop_short %} ({% data variables.release-phases.public_preview %}) +### {% data variables.copilot.copilot_desktop_short %} You can generate commit messages and descriptions in {% data variables.product.prodname_desktop %} based on the changes you make to your project. @@ -112,11 +112,20 @@ Alternatively, set to "No policy" to leave organization owners to make the decis > [!TIP] Enabling your license holders to use {% data variables.copilot.copilot_coding_agent %} is the first step in making {% data variables.copilot.copilot_coding_agent %} available for use in repositories in your organizations. For more information, see [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/adding-copilot-coding-agent-to-organization). -### MCP servers on {% data variables.product.prodname_dotcom_the_website %} +### MCP servers in {% data variables.product.prodname_copilot_short %} -> [!NOTE] Use of MCP servers on {% data variables.product.prodname_dotcom_the_website %} is in public preview and subject to change. +{% data reusables.copilot.coding-agent.mcp-brief-intro %} -{% data reusables.copilot.coding-agent.mcp-brief-intro %} See [AUTOTITLE](/copilot/using-github-copilot/coding-agent/extending-copilot-coding-agent-with-mcp). +You can enable this policy to allow users to connect MCP servers to {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %} and {% data variables.copilot.copilot_coding_agent_short %}. + +* By default, this policy is disabled. When disabled, users with a {% data variables.product.prodname_copilot_short %} seat assigned by the enterprise or any child organizations will not be able to access MCP servers (remote or local) in {% data variables.product.prodname_copilot_short %}. +* If the policy is set to **Disabled** or **Enabled** at the enterprise level, all child organizations will inherit the same policy configuration. +* This policy only applies to users with a {% data variables.copilot.copilot_enterprise_short %} or {% data variables.copilot.copilot_business_short %} seat assigned by the same enterprise (or any of its child organizations) configuring the policy. It does not govern MCP access for any users with a {% data variables.product.prodname_copilot_short %} Free, Pro or Pro+ license. + +> [!NOTE] +> This policy does not apply to {% data variables.product.prodname_copilot_short %} editors where MCP support is still in preview. Instead, you can use the **Editor preview features** policy to disable MCP access in these editors. + +For more information on using MCP, see [AUTOTITLE](/copilot/how-tos/context/model-context-protocol/extending-copilot-chat-with-mcp) and [AUTOTITLE](/copilot/using-github-copilot/coding-agent/extending-copilot-coding-agent-with-mcp). ## Configuring policies for {% data variables.product.prodname_copilot %} diff --git a/content/copilot/how-tos/administer/organizations/managing-policies-for-copilot-in-your-organization.md b/content/copilot/how-tos/administer/organizations/managing-policies-for-copilot-in-your-organization.md index 159544004ff9..7c599f2fc526 100644 --- a/content/copilot/how-tos/administer/organizations/managing-policies-for-copilot-in-your-organization.md +++ b/content/copilot/how-tos/administer/organizations/managing-policies-for-copilot-in-your-organization.md @@ -34,10 +34,11 @@ Organization owners can set policies to govern how {% data variables.product.pro >[!NOTE] This setting only applies to preview features within {% data variables.product.prodname_copilot_short %} and does not control all preview-related settings in {% data variables.product.prodname_vscode_shortname %}. * {% data variables.copilot.copilot_coding_agent %} ({% data variables.release-phases.public_preview %}) * {% data variables.copilot.copilot_spaces %} (public preview) -* MCP servers on {% data variables.product.prodname_dotcom_the_website %} ({% data variables.release-phases.public_preview %}) +* MCP servers in {% data variables.product.prodname_copilot_short %} +* {% data variables.copilot.copilot_spaces %} ({% data variables.release-phases.public_preview %}) * {% data variables.copilot.copilot_mobile_short %} * {% data variables.copilot.copilot_cli_short %} and {% data variables.product.prodname_windows_terminal %} -* {% data variables.copilot.copilot_desktop_short %} ({% data variables.release-phases.public_preview %}) +* {% data variables.copilot.copilot_desktop_short %} * Suggestions matching public code * Access to alternative models for {% data variables.product.prodname_copilot_short %} * Anthropic {% data variables.copilot.copilot_claude %} in {% data variables.product.prodname_copilot_short %} @@ -65,13 +66,30 @@ If an organization member is assigned a seat by multiple organizations with diff For example, to enable or disable suggestion matching, in the "Suggestions matching public code" dropdown, select **Allowed** or **Blocked**. -1. If your organization has a {% data variables.copilot.copilot_business_short %}{% ifversion ghec %} or {% data variables.copilot.copilot_enterprise_short %}{% endif %} plan and you enable "{% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_dotcom_the_website %}", two additional options are displayed: +1. If your organization has a {% data variables.copilot.copilot_business_short %}{% ifversion ghec %} or {% data variables.copilot.copilot_enterprise_short %}{% endif %} plan and you enable "{% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_dotcom_the_website %}," two additional options are displayed: {% data reusables.copilot.policies-for-dotcom %} > [!TIP] > If you choose to enable {% data variables.copilot.copilot_coding_agent %} for users, you also need to define which repositories the agent is available in, see [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/adding-copilot-coding-agent-to-organization). +## Setting a policy for MCP servers connecting to {% data variables.product.prodname_copilot_short %} in your organization + +{% data reusables.copilot.coding-agent.mcp-brief-intro %} + +You can enable this policy to allow users to connect MCP (Model Context Protocol) servers to {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %} and {% data variables.copilot.copilot_coding_agent_short %}. + +* By default, this policy is disabled. When disabled, members with a {% data variables.product.prodname_copilot_short %} seat assigned by the organization will not be able to access MCP servers (remote or local) in {% data variables.product.prodname_copilot_short %}. +* If there is a parent enterprise with the policy set to **Enabled** or **Disabled**, the organizations will inherit (and cannot change) the configuration set by the parent enterprise. +* If **No policy** is selected at the enterprise level and multiple organizations within the enterprise assign seats to the same users, each with different policies, the least restrictive policy is applied. +* This policy only applies to members with a {% data variables.copilot.copilot_enterprise_short %} or {% data variables.copilot.copilot_business_short %} license assigned by the same organization configuring or inheriting the policy. It does not govern MCP access for any members with a {% data variables.product.prodname_copilot_short %} Free, Pro or Pro+ plan. +* For centralized governance across all organizations you can configure the policy at the enterprise level. + +> [!NOTE] +> This policy does not apply to {% data variables.product.prodname_copilot_short %} editors where MCP support is still in preview. Instead, you can use the **Editor preview features** policy to disable MCP access in these editors. + +For more information on using MCP, see [AUTOTITLE](/copilot/how-tos/context/model-context-protocol/extending-copilot-chat-with-mcp) and [AUTOTITLE](/copilot/using-github-copilot/coding-agent/extending-copilot-coding-agent-with-mcp). + ## Setting a policy for {% data variables.copilot.copilot_extensions %} in your organization {% data variables.copilot.copilot_extensions %} integrate external tools with {% data variables.copilot.copilot_chat %}. See [AUTOTITLE](/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat). diff --git a/content/copilot/how-tos/context/model-context-protocol/extending-copilot-chat-with-mcp.md b/content/copilot/how-tos/context/model-context-protocol/extending-copilot-chat-with-mcp.md index 4e9f19490c51..95cb7888365c 100644 --- a/content/copilot/how-tos/context/model-context-protocol/extending-copilot-chat-with-mcp.md +++ b/content/copilot/how-tos/context/model-context-protocol/extending-copilot-chat-with-mcp.md @@ -14,8 +14,8 @@ redirect_from: --- >[!NOTE] -> * MCP support is currently in {% data variables.release-phases.public_preview %} and subject to change. -> * MCP support is available in {% data variables.copilot.copilot_chat_short %} for {% data variables.product.prodname_vscode %}, JetBrains, Eclipse, and Xcode. +> * MCP support is generally available (GA) in {% data variables.copilot.copilot_chat_short %} for {% data variables.product.prodname_vscode %}. +> * MCP support for Copilot in {% data variables.product.prodname_vs %}, JetBrains, Eclipse, and Xcode is in {% data variables.release-phases.public_preview %} and is subject to change. > * The [AUTOTITLE](/free-pro-team@latest/site-policy/github-terms/github-pre-release-license-terms) apply to your use of this product. {% vscode %} @@ -26,6 +26,8 @@ The Model Context Protocol (MCP) is an open standard that defines how applicatio You can use MCP to extend the capabilities of {% data variables.copilot.copilot_chat_short %} by integrating it with a wide range of existing tools and services. For example, the {% data variables.product.github %} MCP server allows you to use {% data variables.copilot.copilot_chat_short %} in {% data variables.product.prodname_vscode %} to perform tasks on {% data variables.product.github %}. You can also use MCP to create new tools and services that work with {% data variables.copilot.copilot_chat_short %}, allowing you to customize and enhance your experience. +Enterprises and organizations can choose to enable or disable use of MCP for members of their organization or enterprise. See [AUTOTITLE](/copilot/how-tos/administer/enterprises/managing-policies-and-features-for-copilot-in-your-enterprise#mcp-servers-on-githubcom). The MCP policy only applies to members with {% data variables.copilot.copilot_business_short %}, {% data variables.copilot.copilot_enterprise_short %}, or {% data variables.product.prodname_copilot_short %} licenses assigned by the organization or enterprise that configures the policy. {% data variables.copilot.copilot_free_short %}, {% data variables.copilot.copilot_pro_short %}, or {% data variables.copilot.copilot_pro_plus_short %} do not have their MCP access governed by this policy. + For more information on MCP, see [the official MCP documentation](https://modelcontextprotocol.io/introduction). For information on some of the other currently available MCP servers, see [the MCP servers repository](https://github.com/modelcontextprotocol/servers/tree/main). @@ -82,7 +84,7 @@ For information on configuring the {% data variables.product.github %} MCP serve 1. To view your list of available MCP servers, click the tools icon in the top left corner of the chat box. This will open the MCP server list, where you can see all the MCP servers and associated tools that are currently available in your {% data variables.product.prodname_vscode %} instance. * Optionally, you can define toolsets, groups of related tools that you can reference in chat. Toolsets make it easier to group related MCP tools together and quickly enable or disable them. For information on how to define and use a toolset, see the [{% data variables.product.prodname_vscode_shortname %} docs](https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode#_define-tool-sets). -For more information on configuring MCP servers in {% data variables.product.prodname_vscode %}, see [Use MCP servers in {% data variables.product.prodname_vscode %} (Preview)](https://aka.ms/vscode-add-mcp) in the {% data variables.product.prodname_vscode %} documentation. +For more information on configuring MCP servers in {% data variables.product.prodname_vscode %}, see [Use MCP servers in {% data variables.product.prodname_vscode %}](https://aka.ms/vscode-add-mcp) in the {% data variables.product.prodname_vscode %} documentation. ## Using MCP servers in {% data variables.copilot.copilot_chat_short %} @@ -107,7 +109,7 @@ Optionally, you can use MCP prompts and resources in {% data variables.product.p * MCP servers can define preconfigured prompts for interacting with their tools. You can access these prompts in chat with slash commands, using the format `/mcp.servername.promptname`. * MCP servers provide resources, which are any kind of data that the server wants to make available. For example, the {% data variables.product.github %} MCP server provides repository content as a resource. To add resources from an MCP server to your chat context, click **Add Context...** in the chat box, then click **MCP Resources**. -For more information on using MCP servers in {% data variables.product.prodname_vscode %}, see [Use MCP servers in {% data variables.product.prodname_vscode %} (Preview)](https://aka.ms/vscode-add-mcp) in the {% data variables.product.prodname_vscode %} documentation. +For more information on using MCP servers in {% data variables.product.prodname_vscode %}, see [Use MCP servers in {% data variables.product.prodname_vscode %}](https://aka.ms/vscode-add-mcp) in the {% data variables.product.prodname_vscode %} documentation. ## Using existing MCP configurations @@ -140,13 +142,13 @@ For information on other currently available MCP servers, see [the MCP servers r ## Configuring MCP servers in JetBrains IDEs 1. In the lower right corner, click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %}**. -1. From the menu, select "Edit settings". -1. Under the MCP section, click "Edit in `mcp.json`". +1. From the menu, select "Edit settings." +1. Under the MCP section, click "Edit in `mcp.json`." 1. Define your MCP servers. You can use the following configuration as an example: {% data reusables.copilot.mcp-chat-json-snippet-for-other-ides %} -Alternatively, to access the MCP settings, once you're in "Agent Mode", click the tools icon, then click **Add more tools**. +Alternatively, to access the MCP settings, once you're in "Agent Mode," click the tools icon, then click **Add more tools**. {% endjetbrains %} @@ -167,7 +169,7 @@ For information on other currently available MCP servers, see [the MCP servers r 1. Open the {% data variables.product.prodname_copilot %} for Xcode extension. 1. In agent mode, click the tools icon. -1. Select "Edit config". +1. Select "Edit config." 1. Define your MCP servers, editing `mcp.json`. You can use the following configuration as an example: {% data reusables.copilot.mcp-chat-json-snippet-for-other-ides %} @@ -191,7 +193,7 @@ For information on other currently available MCP servers, see [the MCP servers r ## Configuring MCP servers in Eclipse 1. To open the {% data variables.copilot.copilot_chat_short %} panel, click the {% data variables.product.prodname_copilot_short %} icon ({% octicon "copilot" aria-hidden="true" aria-label="copilot" %}) in the status bar at the bottom of Eclipse. -1. From the menu, select "Edit preferences". +1. From the menu, select "Edit preferences." 1. In the left pane, expand {% data variables.copilot.copilot_chat_short %} and click **MCP**. 1. Define your MCP servers. You can use the following configuration as an example: diff --git a/content/copilot/how-tos/custom-instructions/adding-repository-custom-instructions-for-github-copilot.md b/content/copilot/how-tos/custom-instructions/adding-repository-custom-instructions-for-github-copilot.md index 9ce1b511a9de..fd994b5f9ff8 100644 --- a/content/copilot/how-tos/custom-instructions/adding-repository-custom-instructions-for-github-copilot.md +++ b/content/copilot/how-tos/custom-instructions/adding-repository-custom-instructions-for-github-copilot.md @@ -238,7 +238,7 @@ You can create a custom instructions file in your repository via the {% data var Whitespace between instructions is ignored, so the instructions can be written as a single paragraph, each on a new line, or separated by blank lines for legibility. 1. Open the {% data variables.product.prodname_copilot %} for Xcode application. -1. At the top of the application window, click **Advanced**. +1. At the top of the application window, under **Settings**, click **Advanced**. 1. To the right of "Custom Instructions", click **Current Workspace** or **Global** to choose whether the custom instructions apply to the current workspace or all workspaces. {% endxcode %} diff --git a/content/copilot/tutorials/enhancing-copilot-agent-mode-with-mcp.md b/content/copilot/tutorials/enhancing-copilot-agent-mode-with-mcp.md index b686cf74c718..e799618fca39 100644 --- a/content/copilot/tutorials/enhancing-copilot-agent-mode-with-mcp.md +++ b/content/copilot/tutorials/enhancing-copilot-agent-mode-with-mcp.md @@ -11,15 +11,15 @@ type: how_to --- >[!NOTE] -> * MCP support is currently in {% data variables.release-phases.public_preview %} and subject to change. -> * MCP support is available in {% data variables.copilot.copilot_chat_short %} for {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains, Eclipse, and Xcode. +> * MCP support is generally available (GA) in {% data variables.copilot.copilot_chat_short %} for {% data variables.product.prodname_vscode %}. +> * MCP support for Copilot in {% data variables.product.prodname_vs %}, JetBrains, Eclipse, and Xcode is in {% data variables.release-phases.public_preview %} and is subject to change. > * The [AUTOTITLE](/free-pro-team@latest/site-policy/github-terms/github-pre-release-license-terms) apply to your use of this product. ## About {% data variables.product.prodname_copilot_short %}'s agentic capabilities and MCP {% data variables.product.prodname_copilot_short %}'s agentic capabilities refer to the ability to **work independently** by executing multi-step workflows without constant guidance, **make decisions** by choosing appropriate tools and approaches based on context, and **iterate and adapt** by adjusting its approach according to feedback and results. You can access these capabilities by using agent mode. -When combined with Model Context Protocol (MCP) servers, agent mode becomes significantly more powerful, giving {% data variables.product.prodname_copilot_short %} access to external resources without switching context. This enables {% data variables.product.prodname_copilot_short %} to complete agentic "loops", where it can dynamically adapt its approach by autonomously finding relevant information, analyzing feedback, and making informed decisions. With MCP, {% data variables.product.prodname_copilot_short %} can complete a task with minimal human intervention, continuously adjusting its strategy based on what it discovers. +When combined with Model Context Protocol (MCP) servers, agent mode becomes significantly more powerful, giving {% data variables.product.prodname_copilot_short %} access to external resources without switching context. This enables {% data variables.product.prodname_copilot_short %} to complete agentic "loops," where it can dynamically adapt its approach by autonomously finding relevant information, analyzing feedback, and making informed decisions. With MCP, {% data variables.product.prodname_copilot_short %} can complete a task with minimal human intervention, continuously adjusting its strategy based on what it discovers. ### Benefits of combining MCP with agent mode diff --git a/content/desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project-in-github-desktop.md b/content/desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project-in-github-desktop.md index b29ba610d0ba..d4a63b92c839 100644 --- a/content/desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project-in-github-desktop.md +++ b/content/desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project-in-github-desktop.md @@ -24,7 +24,7 @@ Repository administrators can enable rulesets for a branch to enforce specific c 1. [Create a new branch](/desktop/making-changes-in-a-branch/managing-branches-in-github-desktop), or select an existing branch by clicking **{% octicon "git-branch" aria-hidden="true" aria-label="git-branch" %} Current Branch** on the toolbar and selecting the branch from the list. - ![Screenshot of the "Current Branch" dropdown view. Under "Recent Branches", a branch, named "my-feature", is highlighted with an orange outline.](/assets/images/help/desktop/select-branch-from-dropdown.png) + ![Screenshot of the "Current Branch" dropdown view. Under "Recent Branches," a branch, named "my-feature," is highlighted with an orange outline.](/assets/images/help/desktop/select-branch-from-dropdown.png) {% data reusables.desktop.make-changes %} ## Choosing how to display diffs @@ -32,7 +32,7 @@ Repository administrators can enable rulesets for a branch to enforce specific c You can change the way diffs are displayed in {% data variables.product.prodname_desktop %} to suit your reviewing needs. To change how you view diffs, in the top-right corner of the diff view, click {% octicon "gear" aria-label="The Gear icon" %}. -* To change how the entire diff is displayed, under "Diff display", select **Unified** or **Split**. The Unified view shows changes linearly, while the Split view shows old content on the left side and new content on the right side. +* To change how the entire diff is displayed, under "Diff display," select **Unified** or **Split**. The Unified view shows changes linearly, while the Split view shows old content on the left side and new content on the right side. * To hide whitespace changes so you can focus on more substantive changes, select **Hide Whitespace Changes**. ![Screenshot of the diff view of a file. A gear icon is outlined in orange and expanded to display "Whitespace" and "Diff display" settings.](/assets/images/help/desktop/diff-selection.png) @@ -43,7 +43,7 @@ If you need to see more of the file than {% data variables.product.prodname_desk * To see the next few lines above or below the highlighted changes, click the arrow above or below the line numbers. * To see the entire file, right-click in the diff view and click **Expand Whole File**. -![Screenshot of the diff view of a "README" file. Over a green "addition" line, in a context menu, the cursor hovers over "Expand Whole File".](/assets/images/help/desktop/expand-diff-view.png) +![Screenshot of the diff view of a "README" file. Over a green "addition" line, in a context menu, the cursor hovers over "Expand Whole File."](/assets/images/help/desktop/expand-diff-view.png) ## Selecting changes to include in a commit @@ -57,7 +57,7 @@ In the "Changes" tab in the left sidebar: * To access stashed changes, click **Stashed Changes**. * {% data reusables.desktop.commit-all-desc %} - ![Screenshot of the "Changes" tab. Above the list of changed files, next to the text "3 changed files", a selected checkbox is outlined in orange.](/assets/images/help/desktop/commit-all.png) + ![Screenshot of the "Changes" tab. Above the list of changed files, next to the text "3 changed files," a selected checkbox is outlined in orange.](/assets/images/help/desktop/commit-all.png) * {% data reusables.desktop.commit-some-desc %} ### Creating a partial commit @@ -79,7 +79,7 @@ Discarded changes are saved in a dated file in the Trash. You can recover discar {% data reusables.desktop.select-discard-files %} {% data reusables.desktop.click-discard-files %} - ![Screenshot of the "Changes" tab. Two selected files are highlighted in blue. In a context menu, the cursor hovers over "Discard 2 Selected Changes".](/assets/images/help/desktop/discard-changes-mac.png) + ![Screenshot of the "Changes" tab. Two selected files are highlighted in blue. In a context menu, the cursor hovers over "Discard 2 Selected Changes."](/assets/images/help/desktop/discard-changes-mac.png) {% data reusables.desktop.confirm-discard-files %} ### Discarding changes in one or more lines @@ -91,7 +91,7 @@ You can discard one or more changed lines that are uncommitted. To discard one added line, in the list of changed lines, right-click the line number of the line you want to discard, then select **Discard Added Line**. -![Screenshot of the diff view of a file. In a context menu, a cursor hovers over "Discard Added Line", highlighted in blue.](/assets/images/help/desktop/discard-single-line.png) +![Screenshot of the diff view of a file. In a context menu, a cursor hovers over "Discard Added Line," highlighted in blue.](/assets/images/help/desktop/discard-single-line.png) To discard a group of changed lines, right-click the vertical bar to the right of the line numbers for the lines you want to discard, then select **Discard added lines**. @@ -105,7 +105,8 @@ Once you're satisfied with the changes you've chosen to include in your commit, > {% data reusables.desktop.tags-push-with-commits %} For more information, see [AUTOTITLE](/desktop/managing-commits/managing-tags-in-github-desktop). 1. At the bottom of the list of changes, next to your profile picture, describe your commit: - * If you have access to {% data variables.product.prodname_copilot %} and you are using [{% data variables.product.prodname_desktop %} beta](https://desktop.github.com/beta/), you can automatically create a commit message and details based on the changes you made. Click {% octicon "copilot" aria-label="Generate commit message with Copilot" %}. + * If you have access to {% data variables.product.prodname_copilot %}, you can automatically create a commit message and details based on the changes you made. Click {% octicon "copilot" aria-label="Generate commit message with Copilot" %}. + * If you want to regenerate a different commit message, click {% octicon "copilot" aria-label="Regenerate commit message with Copilot" %} again to generate a new suggestion. * Alternatively, type your own short, meaningful commit message in the Summary field. You can also add more information about the change in the Description field. ![Screenshot of the "Changes" tab. The "Summary" field and "Generate commit message with Copilot" button are outlined in orange.](/assets/images/help/desktop/create-commit-details.png) @@ -125,7 +126,7 @@ Once you're satisfied with the changes you've chosen to include in your commit, If a pull request has not been created for the current branch, {% data variables.product.prodname_desktop %} will give you the option to preview the changes and create one. For more information, see [AUTOTITLE](/desktop/working-with-your-remote-repository-on-github-or-github-enterprise/creating-an-issue-or-pull-request-from-github-desktop). - ![Screenshot of the "No local changes" view. A button, labeled "Preview Pull Request", is highlighted with an orange outline.](/assets/images/help/desktop/mac-preview-pull-request.png) + ![Screenshot of the "No local changes" view. A button, labeled "Preview Pull Request," is highlighted with an orange outline.](/assets/images/help/desktop/mac-preview-pull-request.png) ## Managing your commit history diff --git a/src/content-render/unified/rewrite-local-links.js b/src/content-render/unified/rewrite-local-links.js index ee297d85db05..795abd0605b8 100644 --- a/src/content-render/unified/rewrite-local-links.js +++ b/src/content-render/unified/rewrite-local-links.js @@ -1,3 +1,6 @@ +// When updating this file to typescript, +// update links in content/contributing as well + import path from 'path' import stripAnsi from 'strip-ansi' diff --git a/src/frame/lib/frontmatter.js b/src/frame/lib/frontmatter.js index bb8dddd9ce61..9d12b7049709 100644 --- a/src/frame/lib/frontmatter.js +++ b/src/frame/lib/frontmatter.js @@ -1,3 +1,6 @@ +// when updating to typescript, +// update links in content/contributing as well + import parse from './read-frontmatter' import { allVersions } from '@/versions/lib/all-versions' import { allTools } from '@/tools/lib/all-tools' diff --git a/src/shielding/middleware/handle-malformed-urls.ts b/src/shielding/middleware/handle-malformed-urls.ts new file mode 100644 index 000000000000..a785864e5069 --- /dev/null +++ b/src/shielding/middleware/handle-malformed-urls.ts @@ -0,0 +1,31 @@ +import type { Response, NextFunction } from 'express' + +import { defaultCacheControl } from '@/frame/middleware/cache-control' +import { ExtendedRequest } from '@/types' + +/** + * Middleware to handle malformed UTF-8 sequences in URLs that cause + * decodeURIComponent to fail. This prevents crashes from malicious + * requests containing invalid URL-encoded sequences like %FF. + */ +export default function handleMalformedUrls( + req: ExtendedRequest, + res: Response, + next: NextFunction, +) { + // Check URL for malformed UTF-8 sequences + // Express/router doesn't catch these during initial parsing - they cause + // crashes later when decodeURIComponent is called at the router level + const url = req.originalUrl || req.url + try { + decodeURIComponent(url) + } catch { + // If any decoding fails, this is a malformed URL + defaultCacheControl(res) + res.setHeader('content-type', 'text/plain') + res.status(400).send('Bad Request: Malformed URL') + return + } + + return next() +} diff --git a/src/shielding/middleware/index.ts b/src/shielding/middleware/index.ts index a22f952c520d..61af52f9c085 100644 --- a/src/shielding/middleware/index.ts +++ b/src/shielding/middleware/index.ts @@ -1,5 +1,6 @@ import express from 'express' +import handleMalformedUrls from './handle-malformed-urls' import handleInvalidQuerystrings from './handle-invalid-query-strings' import handleInvalidPaths from './handle-invalid-paths' import handleOldNextDataPaths from './handle-old-next-data-paths' @@ -9,6 +10,7 @@ import handleInvalidHeaders from './handle-invalid-headers' const router = express.Router() +router.use(handleMalformedUrls) router.use(handleInvalidQuerystrings) router.use(handleInvalidPaths) router.use(handleOldNextDataPaths) diff --git a/src/shielding/tests/malformed-urls.ts b/src/shielding/tests/malformed-urls.ts new file mode 100644 index 000000000000..9262e707f084 --- /dev/null +++ b/src/shielding/tests/malformed-urls.ts @@ -0,0 +1,72 @@ +import { describe, expect, test } from 'vitest' +import { get } from '@/tests/helpers/e2etest' + +describe('malformed URLs', () => { + test('blocks URLs with %FF sequences', async () => { + const res = await get('/en/site-policy/other-site-policies/github-account-%FFqrlkuciqll-policy') + + expect(res.statusCode).toBe(400) + expect(res.headers['content-type']).toMatch('text/plain') + expect(res.body).toBe('Bad Request: Malformed URL') + }) + + test('blocks URLs with %FE sequences', async () => { + const res = await get('/en/some-page-%FE-test') + expect(res.statusCode).toBe(400) + expect(res.headers['content-type']).toMatch('text/plain') + expect(res.body).toBe('Bad Request: Malformed URL') + }) + + test('blocks URLs with overlong encoding %C0%80', async () => { + const res = await get('/en/test-%C0%80-page') + expect(res.statusCode).toBe(400) + expect(res.headers['content-type']).toMatch('text/plain') + expect(res.body).toBe('Bad Request: Malformed URL') + }) + + test('blocks URLs with invalid UTF-8 continuation sequences', async () => { + const res = await get('/en/test-%80%80-page') + expect(res.statusCode).toBe(400) + expect(res.headers['content-type']).toMatch('text/plain') + expect(res.body).toBe('Bad Request: Malformed URL') + }) + + test('allows URLs with control characters (valid UTF-8)', async () => { + const res = await get('/en/test-%01-page') + expect(res.statusCode).toBe(404) // Should be 404 since page doesn't exist, not 400 + // Control characters like %01 are valid UTF-8 and don't cause decoding errors + }) + + test('allows valid URLs with proper encoding', async () => { + const res = await get('/en/get-started') + expect(res.statusCode).not.toBe(400) + // Should not be blocked by malformed URL middleware + }) + + test('allows valid URLs with proper percent encoding', async () => { + const res = await get('/en/search?q=test%20query') + expect(res.statusCode).not.toBe(400) + // Should not be blocked by malformed URL middleware + }) + + test('blocks malformed query parameters', async () => { + // This is caught by checking originalUrl which contains the raw, unparsed URL + const res = await get('/en/search?q=test%FF') + expect(res.statusCode).toBe(400) + expect(res.headers['content-type']).toMatch('text/plain') + expect(res.body).toBe('Bad Request: Malformed URL') + }) + + test('properly caches malformed URL responses', async () => { + const res = await get('/en/malformed-%FF-url') + expect(res.statusCode).toBe(400) + expect(res.headers['cache-control']).toBeDefined() + }) + + test('handles multiple malformed sequences', async () => { + const res = await get('/en/test-%FF%FE%80-page') + expect(res.statusCode).toBe(400) + expect(res.headers['content-type']).toMatch('text/plain') + expect(res.body).toBe('Bad Request: Malformed URL') + }) +})