cn 我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们


Reference documentation for creating workflows, using GitHub-hosted runners, and authentication.

Workflow syntax

The workflow file is written in YAML. In the YAML workflow file, you can use expression syntax to evaluate contextual information, literals, operators, and functions. Contextual information includes workflow, environment variables, secrets, and the events that triggered the workflow. When you use run in a workflow step to run shell commands, you can use specific workflow command syntax to set environment variables, set output parameters for subsequent steps, and set error or debug messages.


You can configure workflows to run when specific GitHub events occur, at a scheduled time, manually, or when events outside of GitHub occur.

Authentication and secrets

GitHub provides a token that you can use to authenticate on behalf of GitHub Actions. You can also store sensitive information as a secret in your organization, repository, or environments. GitHub encrypts all secrets.


Workflow jobs can reference environments that have protection rules or environment-specific secrets.

GitHub-hosted runners

GitHub offers hosted virtual machines to run workflows. The virtual machine contains an environment with tools, packages, and environment variables for GitHub Actions to use.


When you run workflows on GitHub-hosted runners, there are usage limits and potential usage charges. You can also disable or restrict the usage of GitHub Actions in a repository and organization.


Privacy policy


所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。


或, 了解如何参与。