Skip to main content

Workflows and actions reference

Find information on workflows and actions in GitHub Actions.

GitHub Actions 的工作流语法

工作流程是可配置的自动化过程,由一个或多个作业组成。 您必须创建 YAML 文件来定义工作流程配置。

触发工作流的事件

你可以配置工作流在 GitHub 上发生特定活动时运行、在预定的时间运行,或者在 GitHub 外部的事件发生时运行。

GitHub Actions 的工作流命令

您可以在工作流程或操作代码中运行 shell 命令时使用工作流程命令。

变量参考

查找有关 GitHub Actions 工作流中支持的变量、命名约定、限制和上下文的信息。

对工作流和操作中的表达式求值

查找有关 GitHub Actions 中表达式的信息。

上下文参考

查找有关 GitHub Actions 工作流中可用上下文的信息,包括可用属性、访问方法和使用示例。

Deployments and environments

Find information about deployment protection rules, environment secrets, and environment variables.

Dependency caching reference

Find information on the functionality of dependency caching in workflows.

可重用工作流程参考

了解如何通过重用现有工作流程来避免在创建工作流程时重复。

元数据语法参考

可创建操作来执行存储库中的任务。 操作需要使用 YAML 语法的元数据文件。

Workflow cancellation reference

Find information on the steps GitHub takes to cancel a workflow run.

Dockerfile 对 GitHub Actions 的支持

为 Docker 容器创建 Dockerfile 时,你应该知道一些 Docker 指令如何与 GitHub Actions 及操作的元数据文件交互。