Class: GhaWorkflow
A workflow file in a repository’s .github/workflows directory: the events that run it, the access its GITHUB_TOKEN gets, and its jobs.
URI: gha:Workflow
classDiagram
class GhaWorkflow
click GhaWorkflow href "../GhaWorkflow/"
GhaWorkflow <|-- GhaReusableWorkflow
click GhaReusableWorkflow href "../GhaReusableWorkflow/"
GhaWorkflow : jobs
GhaWorkflow --> "1..*" GhaWorkflowJob : jobs
click GhaWorkflowJob href "../GhaWorkflowJob/"
GhaWorkflow : permissions
GhaWorkflow : triggers
GhaWorkflow : workflow_path
GhaWorkflow : workflow_repository
GhaWorkflow : workflow_uri
Inheritance
Section titled “Inheritance”- GhaWorkflow
Class Properties
Section titled “Class Properties”| Property | Value |
|---|---|
| Class URI | gha:Workflow |
| Name | Cardinality and Range | Description | Inheritance |
|---|---|---|---|
| triggers | 1..* String |
The names of the events under the file’s on key, such as push, `pull_requ… |
direct |
| workflow_uri | 1 Uri |
The file’s address on its forge without a ref: `https://github | direct |
| workflow_path | 1 String |
The file’s path from the repository root, as GitHub’s build type writes workf… | direct |
| workflow_repository | 0..1 Uri |
The repository that holds the file, as GitHub’s build type writes workflow | direct |
| permissions | * GhaPermission |
The access the file’s top-level permissions key gives every job’s GITHUB_TO… |
direct |
| jobs | 1..* GhaWorkflowJob |
The jobs under the file’s jobs key |
direct |
Usages
Section titled “Usages”| used by | used in | type | used |
|---|---|---|---|
| GhaDocument | workflows | range | GhaWorkflow |
| GhaRequiredStatusCheck | emitted_by | range | GhaWorkflow |
Comments
Section titled “Comments”- SPDX 3.0.1’s Build records one run of a build, such as a run of this workflow, so it is a related term and not a close one.
- The ref a run checks the file out at belongs to the run, and GitHub’s build type records it in provenance as workflow.ref; it is not a fact of the file, so it is not modelled here.
See Also
Section titled “See Also”Identifier and Mapping Information
Section titled “Identifier and Mapping Information”Schema Source
Section titled “Schema Source”- from schema: https://w3id.org/lmodel/github-actions
Mappings
Section titled “Mappings”| Mapping Type | Mapped Value |
|---|---|
| self | gha:Workflow |
| native | gha:GhaWorkflow |
| related | spdx_build:Build |
| close | cdx:workflow |
LinkML Source
Section titled “LinkML Source”Direct
Section titled “Direct”name: GhaWorkflowdescription: 'A workflow file in a repository''s `.github/workflows` directory: the events that run it, the access its GITHUB_TOKEN gets, and its jobs.'comments:- SPDX 3.0.1's Build records one run of a build, such as a run of this workflow, so it is a related term and not a close one.- The ref a run checks the file out at belongs to the run, and GitHub's build type records it in provenance as workflow.ref; it is not a fact of the file, so it is not modelled here.from_schema: https://w3id.org/lmodel/github-actionssee_also:- https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntaxclose_mappings:- cdx:workflowrelated_mappings:- spdx_build:Buildslots:- triggersslot_usage: triggers: name: triggers required: trueattributes: workflow_uri: name: workflow_uri description: 'The file''s address on its forge without a ref: `https://github.com/<owner>/<repo>/.github/workflows/<file>`.' comments: - GitHub's build type forms a reusable workflow's builder.id from this address, followed by `@` and the ref. from_schema: https://w3id.org/lmodel/github-actions/github_actions_workflow rank: 1000 identifier: true domain_of: - GhaWorkflow range: uri workflow_path: name: workflow_path description: The file's path from the repository root, as GitHub's build type writes workflow.path. GitHub reads no subdirectory of `.github/workflows`. from_schema: https://w3id.org/lmodel/github-actions/github_actions_workflow see_also: - https://actions.github.io/buildtypes/workflow/v1 rank: 1000 domain_of: - GhaWorkflow required: true pattern: ^\.github/workflows/[^/]+\.ya?ml$ workflow_repository: name: workflow_repository description: 'The repository that holds the file, as GitHub''s build type writes workflow.repository: an HTTPS address without `.git`.' from_schema: https://w3id.org/lmodel/github-actions/github_actions_workflow see_also: - https://actions.github.io/buildtypes/workflow/v1 rank: 1000 domain_of: - GhaWorkflow range: uri pattern: ^https://[^/]+/[^/]+/[^/]+$ permissions: name: permissions description: The access the file's top-level `permissions` key gives every job's GITHUB_TOKEN. Absent when the file sets none, so the repository's or organization's default applies; a scope the map leaves out gets no access. from_schema: https://w3id.org/lmodel/github-actions/github_actions_workflow rank: 1000 domain_of: - GhaWorkflow range: gha_permission multivalued: true jobs: name: jobs description: The jobs under the file's `jobs` key. from_schema: https://w3id.org/lmodel/github-actions/github_actions_workflow rank: 1000 domain_of: - GhaWorkflow range: GhaWorkflowJob required: true multivalued: true inlined: true inlined_as_list: trueclass_uri: gha:WorkflowInduced
Section titled “Induced”name: GhaWorkflowdescription: 'A workflow file in a repository''s `.github/workflows` directory: the events that run it, the access its GITHUB_TOKEN gets, and its jobs.'comments:- SPDX 3.0.1's Build records one run of a build, such as a run of this workflow, so it is a related term and not a close one.- The ref a run checks the file out at belongs to the run, and GitHub's build type records it in provenance as workflow.ref; it is not a fact of the file, so it is not modelled here.from_schema: https://w3id.org/lmodel/github-actionssee_also:- https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntaxclose_mappings:- cdx:workflowrelated_mappings:- spdx_build:Buildslot_usage: triggers: name: triggers required: trueattributes: workflow_uri: name: workflow_uri description: 'The file''s address on its forge without a ref: `https://github.com/<owner>/<repo>/.github/workflows/<file>`.' comments: - GitHub's build type forms a reusable workflow's builder.id from this address, followed by `@` and the ref. from_schema: https://w3id.org/lmodel/github-actions/github_actions_workflow rank: 1000 identifier: true owner: GhaWorkflow domain_of: - GhaWorkflow range: uri required: true workflow_path: name: workflow_path description: The file's path from the repository root, as GitHub's build type writes workflow.path. GitHub reads no subdirectory of `.github/workflows`. from_schema: https://w3id.org/lmodel/github-actions/github_actions_workflow see_also: - https://actions.github.io/buildtypes/workflow/v1 rank: 1000 owner: GhaWorkflow domain_of: - GhaWorkflow range: string required: true pattern: ^\.github/workflows/[^/]+\.ya?ml$ workflow_repository: name: workflow_repository description: 'The repository that holds the file, as GitHub''s build type writes workflow.repository: an HTTPS address without `.git`.' from_schema: https://w3id.org/lmodel/github-actions/github_actions_workflow see_also: - https://actions.github.io/buildtypes/workflow/v1 rank: 1000 owner: GhaWorkflow domain_of: - GhaWorkflow range: uri pattern: ^https://[^/]+/[^/]+/[^/]+$ permissions: name: permissions description: The access the file's top-level `permissions` key gives every job's GITHUB_TOKEN. Absent when the file sets none, so the repository's or organization's default applies; a scope the map leaves out gets no access. from_schema: https://w3id.org/lmodel/github-actions/github_actions_workflow rank: 1000 owner: GhaWorkflow domain_of: - GhaWorkflow range: gha_permission multivalued: true jobs: name: jobs description: The jobs under the file's `jobs` key. from_schema: https://w3id.org/lmodel/github-actions/github_actions_workflow rank: 1000 owner: GhaWorkflow domain_of: - GhaWorkflow range: GhaWorkflowJob required: true multivalued: true inlined: true inlined_as_list: true triggers: name: triggers description: The names of the events under the file's `on` key, such as `push`, `pull_request`, `schedule` or `workflow_call`. comments: - A slot rather than an attribute because GhaReusableWorkflow refines it; a pattern rather than an enumeration, because GitHub adds events. from_schema: https://w3id.org/lmodel/github-actions see_also: - https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows related_mappings: - cdx:trigger rank: 1000 slot_uri: gha:triggers owner: GhaWorkflow domain_of: - GhaWorkflow range: string required: true multivalued: true pattern: ^[a-z_]+$class_uri: gha:Workflow