Table of Contents

Class Job

Namespace
Invex.StructuredText.GithubActions.GithubActionModel
Assembly
Invex.StructuredText.GithubActions.dll

A job within a workflow: a set of steps that execute on the same runner.

public sealed record Job
Inheritance
object
Job

Constructors

Job()

public Job()

Properties

Concurrency

Concurrency settings for this job, limiting parallel runs that share the same group.

public Concurrency? Concurrency { get; init; }

Property Value

Concurrency

Container

The container the job's steps run in (container).

public Container? Container { get; init; }

Property Value

Container

ContinueOnError

Whether the workflow run passes when this job fails (continue-on-error).

public Template? ContinueOnError { get; init; }

Property Value

Template

Env

Environment variables available to all steps in the job.

public IReadOnlyDictionary<string, Template>? Env { get; init; }

Property Value

IReadOnlyDictionary<string, Template>

Environment

The deployment environment the job targets (environment).

public Environment? Environment { get; init; }

Property Value

Environment

If

A condition that must evaluate to true for the job to run (if). Written in expression context, so the expression is not wrapped in ${{ }}.

public BoolExpr? If { get; init; }

Property Value

BoolExpr

Name

The id of the job, used as the YAML key under jobs: and referenced by Needs of other jobs.

public required Template Name { get; init; }

Property Value

Template

Needs

Ids of jobs that must complete successfully before this job runs (needs).

public IReadOnlyList<string> Needs { get; init; }

Property Value

IReadOnlyList<string>

Outputs

Values made available to downstream jobs that depend on this job (outputs). Typically populated from step outputs via StepOutput(string, string).

public IReadOnlyDictionary<string, Template>? Outputs { get; init; }

Property Value

IReadOnlyDictionary<string, Template>

Permissions

GITHUB_TOKEN permissions for this job, overriding the workflow-level default.

public Permissions? Permissions { get; init; }

Property Value

Permissions

RunsOn

The runner(s) the job executes on (runs-on).

public required RunsOn RunsOn { get; init; }

Property Value

RunsOn

Services

Service containers to host alongside the job (services), keyed by service name.

public IReadOnlyDictionary<string, Container>? Services { get; init; }

Property Value

IReadOnlyDictionary<string, Container>

Snapshot

Runner image snapshot settings for the job (snapshot).

public Snapshot? Snapshot { get; init; }

Property Value

Snapshot

Steps

The ordered steps that make up the job. At least one step is required.

public required IReadOnlyList<Step> Steps { get; init; }

Property Value

IReadOnlyList<Step>

Strategy

The matrix strategy used to run multiple variations of the job (strategy).

public Strategy? Strategy { get; init; }

Property Value

Strategy

TimeoutMinutes

The maximum number of minutes the job may run before GitHub cancels it (timeout-minutes).

public Template? TimeoutMinutes { get; init; }

Property Value

Template