{"meta":{"title":"Actions","intro":"“操作”类别中 GraphQL 架构类型的参考文档。","product":"GraphQL API","breadcrumbs":[{"href":"/zh/graphql","title":"GraphQL API"},{"href":"/zh/graphql/reference","title":"参考"},{"href":"/zh/graphql/reference/actions","title":"Actions"}],"documentType":"article"},"body":"# Actions\n\n“操作”类别中 GraphQL 架构类型的参考文档。\n\n## Workflow - object\n\nA workflow contains meta information about an Actions workflow file.\n\n**Implements:** Node, UniformResourceLocatable\n\n### Fields for `Workflow`\n\n* `createdAt` (DateTime!): Identifies the date and time when the object was created.\n* `databaseId` (Int): Identifies the primary key from the database.\n* `id` (ID!): The Node ID of the Workflow object.\n* `name` (String!): The name of the workflow.\n* `resourcePath` (URI!): The HTTP path for this workflow.\n* `runs` (WorkflowRunConnection!): The runs of the workflow.\n  * `after` (String): Returns the elements in the list that come after the specified cursor.\n  * `before` (String): Returns the elements in the list that come before the specified cursor.\n  * `first` (Int): Returns the first n elements from the list.\n  * `last` (Int): Returns the last n elements from the list.\n  * `orderBy` (WorkflowRunOrder): Ordering options for the connection.\n\n* `state` (WorkflowState!): The state of the workflow.\n* `updatedAt` (DateTime!): Identifies the date and time when the object was last updated.\n* `url` (URI!): The HTTP URL for this workflow.\n\n## WorkflowFileReference - object\n\nA workflow that must run for this rule to pass.\n\n### Fields for `WorkflowFileReference`\n\n* `path` (String!): The path to the workflow file.\n* `ref` (String): The ref (branch or tag) of the workflow file to use.\n* `repositoryId` (Int!): The ID of the repository where the workflow is defined.\n* `sha` (String): The commit SHA of the workflow file to use.\n\n## WorkflowFileReferenceInput - input object\n\nA workflow that must run for this rule to pass.\n\n### Input fields for `WorkflowFileReferenceInput`\n\n* `path` (String!): The path to the workflow file.\n* `ref` (String): The ref (branch or tag) of the workflow file to use.\n* `repositoryId` (Int!): The ID of the repository where the workflow is defined.\n* `sha` (String): The commit SHA of the workflow file to use.\n\n## WorkflowRun - object\n\nA workflow run.\n\n**Implements:** Node, UniformResourceLocatable\n\n### Fields for `WorkflowRun`\n\n* `checkSuite` (CheckSuite!): The check suite this workflow run belongs to.\n* `createdAt` (DateTime!): Identifies the date and time when the object was created.\n* `databaseId` (Int): Identifies the primary key from the database.\n* `deploymentReviews` (DeploymentReviewConnection!): The log of deployment reviews. _(Pagination: `after`, `before`, `first`, `last`)_\n* `displayTitle` (String): The human-readable title of the workflow run.\n* `event` (String!): The event that triggered the workflow run.\n* `file` (WorkflowRunFile): The workflow file.\n* `id` (ID!): The Node ID of the WorkflowRun object.\n* `pendingDeploymentRequests` (DeploymentRequestConnection!): The pending deployment requests of all check runs in this workflow run. _(Pagination: `after`, `before`, `first`, `last`)_\n* `resourcePath` (URI!): The HTTP path for this workflow run.\n* `runAttempt` (Int!): The attempt number of this workflow run.\n* `runNumber` (Int!): A number that uniquely identifies this workflow run in its parent workflow.\n* `updatedAt` (DateTime!): Identifies the date and time when the object was last updated.\n* `url` (URI!): The HTTP URL for this workflow run.\n* `workflow` (Workflow!): The workflow executed in this workflow run.\n\n## WorkflowRunConnection - object\n\nThe connection type for WorkflowRun.\n\n### Fields for `WorkflowRunConnection`\n\n* `edges` ([WorkflowRunEdge]): A list of edges.\n* `nodes` ([WorkflowRun]): A list of nodes.\n* `pageInfo` (PageInfo!): Information to aid in pagination.\n* `totalCount` (Int!): Identifies the total count of items in the connection.\n\n## WorkflowRunEdge - object\n\nAn edge in a connection.\n\n### Fields for `WorkflowRunEdge`\n\n* `cursor` (String!): A cursor for use in pagination.\n* `node` (WorkflowRun): The item at the end of the edge.\n\n## WorkflowRunFile - object\n\nAn executed workflow file for a workflow run.\n\n**Implements:** Node, UniformResourceLocatable\n\n### Fields for `WorkflowRunFile`\n\n* `id` (ID!): The Node ID of the WorkflowRunFile object.\n* `path` (String!): The path of the workflow file relative to its repository.\n* `repositoryFileUrl` (URI!): The direct link to the file in the repository which stores the workflow file.\n* `repositoryName` (URI!): The repository name and owner which stores the workflow file.\n* `resourcePath` (URI!): The HTTP path for this workflow run file.\n* `run` (WorkflowRun!): The parent workflow run execution for this file.\n* `url` (URI!): The HTTP URL for this workflow run file.\n* `viewerCanPushRepository` (Boolean!): If the viewer has permissions to push to the repository which stores the workflow.\n* `viewerCanReadRepository` (Boolean!): If the viewer has permissions to read the repository which stores the workflow.\n\n## WorkflowRunOrder - input object\n\nWays in which lists of workflow runs can be ordered upon return.\n\n### Input fields for `WorkflowRunOrder`\n\n* `direction` (OrderDirection!): The direction in which to order workflow runs by the specified field.\n* `field` (WorkflowRunOrderField!): The field by which to order workflows.\n\n## WorkflowRunOrderField - enum\n\nProperties by which workflow run connections can be ordered.\n\n### Values for `WorkflowRunOrderField`\n\n* `CREATED_AT`: Order workflow runs by most recently created.\n\n## WorkflowsParameters - object\n\nRequire all changes made to a targeted branch to pass the specified workflows before they can be merged.\n\n### Fields for `WorkflowsParameters`\n\n* `doNotEnforceOnCreate` (Boolean!): Allow repositories and branches to be created if a check would otherwise prohibit it.\n* `workflows` ([WorkflowFileReference!]!): Workflows that must pass for this rule to pass.\n\n## WorkflowsParametersInput - input object\n\nRequire all changes made to a targeted branch to pass the specified workflows before they can be merged.\n\n### Input fields for `WorkflowsParametersInput`\n\n* `doNotEnforceOnCreate` (Boolean): Allow repositories and branches to be created if a check would otherwise prohibit it.\n* `workflows` ([WorkflowFileReferenceInput!]!): Workflows that must pass for this rule to pass.\n\n## WorkflowState - enum\n\nThe possible states for a workflow.\n\n### Values for `WorkflowState`\n\n* `ACTIVE`: The workflow is active.\n* `DELETED`: The workflow was deleted from the git repository.\n* `DISABLED_FORK`: The workflow was disabled by default on a fork.\n* `DISABLED_INACTIVITY`: The workflow was disabled for inactivity in the repository.\n* `DISABLED_MANUALLY`: The workflow was disabled manually."}