Skip to content

Class: GhaReusableWorkflow

A workflow that other workflows call as a job, because its on key names workflow_call; it declares the inputs, outputs and secrets its callers pass and read.

URI: gha:ReusableWorkflow

 classDiagram
    class GhaReusableWorkflow
    click GhaReusableWorkflow href "../GhaReusableWorkflow/"
      GhaWorkflow <|-- GhaReusableWorkflow
        click GhaWorkflow href "../GhaWorkflow/"
      
      GhaReusableWorkflow : inputs
        
          
    
        
        
        GhaReusableWorkflow --> "*" GhaWorkflowInput : inputs
        click GhaWorkflowInput href "../GhaWorkflowInput/"
    

        
      GhaReusableWorkflow : jobs
        
          
    
        
        
        GhaReusableWorkflow --> "1..*" GhaWorkflowJob : jobs
        click GhaWorkflowJob href "../GhaWorkflowJob/"
    

        
      GhaReusableWorkflow : outputs
        
          
    
        
        
        GhaReusableWorkflow --> "*" GhaWorkflowOutput : outputs
        click GhaWorkflowOutput href "../GhaWorkflowOutput/"
    

        
      GhaReusableWorkflow : permissions
        
      GhaReusableWorkflow : secrets
        
          
    
        
        
        GhaReusableWorkflow --> "*" GhaWorkflowSecret : secrets
        click GhaWorkflowSecret href "../GhaWorkflowSecret/"
    

        
      GhaReusableWorkflow : triggers
        
      GhaReusableWorkflow : workflow_path
        
      GhaReusableWorkflow : workflow_repository
        
      GhaReusableWorkflow : workflow_uri
        
      
Property Value
Class URI gha:ReusableWorkflow
Name Cardinality and Range Description Inheritance
inputs *
GhaWorkflowInput
The inputs under the file’s `on direct
outputs *
GhaWorkflowOutput
The outputs under the file’s `on direct
secrets *
GhaWorkflowSecret
The secrets under the file’s `on direct
triggers 1..*
String
The names of the events under the file’s on key, such as push, `pull_requ… GhaWorkflow
workflow_uri 1
Uri
The file’s address on its forge without a ref: `https://github GhaWorkflow
workflow_path 1
String
The file’s path from the repository root, as GitHub’s build type writes workf… GhaWorkflow
workflow_repository 0..1
Uri
The repository that holds the file, as GitHub’s build type writes workflow GhaWorkflow
permissions *
GhaPermission
The access the file’s top-level permissions key gives every job’s GITHUB_TO… GhaWorkflow
jobs 1..*
GhaWorkflowJob
The jobs under the file’s jobs key GhaWorkflow
used by used in type used
GhaDocument reusable_workflows range GhaReusableWorkflow
  • When it generates provenance it is the builder: GitHub’s build type sets builder.id to the server’s address followed by the job’s workflow reference, which names this file and its ref.
Mapping Type Mapped Value
self gha:ReusableWorkflow
native gha:GhaReusableWorkflow
name: GhaReusableWorkflow
description: A workflow that other workflows call as a job, because its `on` key names
`workflow_call`; it declares the inputs, outputs and secrets its callers pass and
read.
comments:
- 'When it generates provenance it is the builder: GitHub''s build type sets builder.id
to the server''s address followed by the job''s workflow reference, which names
this file and its ref.'
from_schema: https://w3id.org/lmodel/github-actions
see_also:
- https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations
- https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onworkflow_call
is_a: GhaWorkflow
slots:
- inputs
- outputs
slot_usage:
triggers:
name: triggers
has_member:
equals_string: workflow_call
inputs:
name: inputs
description: The inputs under the file's `on.workflow_call.inputs` key.
range: GhaWorkflowInput
outputs:
name: outputs
description: The outputs under the file's `on.workflow_call.outputs` key.
range: GhaWorkflowOutput
attributes:
secrets:
name: secrets
description: The secrets under the file's `on.workflow_call.secrets` key, by name
only; no value is ever recorded.
from_schema: https://w3id.org/lmodel/github-actions/github_actions_workflow
rank: 1000
domain_of:
- GhaReusableWorkflow
range: GhaWorkflowSecret
multivalued: true
inlined: true
inlined_as_list: true
class_uri: gha:ReusableWorkflow
name: GhaReusableWorkflow
description: A workflow that other workflows call as a job, because its `on` key names
`workflow_call`; it declares the inputs, outputs and secrets its callers pass and
read.
comments:
- 'When it generates provenance it is the builder: GitHub''s build type sets builder.id
to the server''s address followed by the job''s workflow reference, which names
this file and its ref.'
from_schema: https://w3id.org/lmodel/github-actions
see_also:
- https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations
- https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onworkflow_call
is_a: GhaWorkflow
slot_usage:
triggers:
name: triggers
has_member:
equals_string: workflow_call
inputs:
name: inputs
description: The inputs under the file's `on.workflow_call.inputs` key.
range: GhaWorkflowInput
outputs:
name: outputs
description: The outputs under the file's `on.workflow_call.outputs` key.
range: GhaWorkflowOutput
attributes:
secrets:
name: secrets
description: The secrets under the file's `on.workflow_call.secrets` key, by name
only; no value is ever recorded.
from_schema: https://w3id.org/lmodel/github-actions/github_actions_workflow
rank: 1000
owner: GhaReusableWorkflow
domain_of:
- GhaReusableWorkflow
range: GhaWorkflowSecret
multivalued: true
inlined: true
inlined_as_list: true
inputs:
name: inputs
description: The inputs under the file's `on.workflow_call.inputs` key.
from_schema: https://w3id.org/lmodel/github-actions
rank: 1000
owner: GhaReusableWorkflow
domain_of:
- GhaReusableWorkflow
- GhaAction
range: GhaWorkflowInput
multivalued: true
inlined: true
inlined_as_list: true
outputs:
name: outputs
description: The outputs under the file's `on.workflow_call.outputs` key.
from_schema: https://w3id.org/lmodel/github-actions
rank: 1000
owner: GhaReusableWorkflow
domain_of:
- GhaReusableWorkflow
- GhaAction
range: GhaWorkflowOutput
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: GhaReusableWorkflow
domain_of:
- GhaWorkflow
range: string
required: true
multivalued: true
pattern: ^[a-z_]+$
has_member:
equals_string: workflow_call
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: GhaReusableWorkflow
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: GhaReusableWorkflow
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: GhaReusableWorkflow
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: GhaReusableWorkflow
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: GhaReusableWorkflow
domain_of:
- GhaWorkflow
range: GhaWorkflowJob
required: true
multivalued: true
inlined: true
inlined_as_list: true
class_uri: gha:ReusableWorkflow