Table of Contents

Interface IWorkflowWriter

Namespace
Invex.Atom.Workflows.Writer
Assembly
Invex.Atom.Workflows.dll

Defines a contract for writers that can generate and validate platform-specific workflow files.

public interface IWorkflowWriter

Remarks

This interface is part of a strategy pattern where different writers handle different CI/CD platforms. Implementations are typically registered as singletons and are expected to be thread-safe.

Properties

WorkflowType

Gets the type of workflow that this writer can handle (e.g., GitHub Actions, Azure DevOps).

Type WorkflowType { get; }

Property Value

Type

Methods

CheckForOutdatedWorkflow(WorkflowModel, CancellationToken)

Checks if the existing workflow file is outdated and needs to be regenerated.

Task<bool> CheckForOutdatedWorkflow(WorkflowModel workflow, CancellationToken cancellationToken = default)

Parameters

workflow WorkflowModel

The workflow model to compare against the existing file.

cancellationToken CancellationToken

A cancellation token.

Returns

Task<bool>

A task that resolves to true if the workflow file is missing or outdated; otherwise, false.

Generate(WorkflowModel, CancellationToken)

Generates a workflow file from the specified workflow model.

Task Generate(WorkflowModel workflow, CancellationToken cancellationToken = default)

Parameters

workflow WorkflowModel

The workflow model to generate.

cancellationToken CancellationToken

A cancellation token.

Returns

Task

A task representing the asynchronous generation operation.