GithubRunner (autotransform.runner.github)

The implementation for the GithubRunner.

class autotransform.runner.github.GithubRunner(*, run_workflow: str, update_workflow: str, repo_name: str | None = None, repo_ref: str | None = None, target_repo_name: str | None = None, target_repo_ref: str | None = None)

Bases: Runner

A Runner component that is used to trigger Github workflows. See examples/workflows/autotransform.run.yml.

run_workflow

The name of the workflow to use for running a Schema.

Type:

str

update_workflow

The name of the workflow to use for updating a Change.

Type:

str

repo_name

The name of the Github repo to trigger actions from. If not provided, the repo of the Schema will be used. Defaults to None.

Type:

optional, Optional[str]

repo_ref

The ref of the Github repo to trigger actions from. If not provided, the base branch of the Schema’s repo will be used. Defaults to None.

Type:

optional, Optional[str]

target_repo_name

The name of the Github repo to checkout. If not provided, the workflow is expected to define the repo on it’s own. Defaults to None.

Type:

optional, Optional[str]

target_repo_ref

The ref of the Github repo to checkout. If not provided, the workflow is expected to define the repo on it’s own. Defaults to None.

Type:

optional, Optional[str]

name

The name of the component.

Type:

ClassVar[RunnerName]

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: ClassVar[RunnerName] = 'github'
repo_name: str | None
repo_ref: str | None
run(schema: AutoTransformSchema) None

Triggers a full run of a Schema by submitting a workflow run to the Github repo in the Schema.

Parameters:

schema (AutoTransformSchema) – The schema that will be run.

run_workflow: str
target_repo_name: str | None
target_repo_ref: str | None
update(change: Change) None

Triggers an update of the Change by submitting a workflow run to the Github repo in the Schema associated with the change.

Parameters:

change (Change) – The Change to update.

update_workflow: str