Table of Contents

Namespace Invex.StructuredText.GithubActions.GithubActionModel

Classes

Concurrency

Concurrency settings (concurrency) that ensure only one run (or queued run) sharing the same group executes at a time, at either workflow or job level.

Container

A Docker container that a job runs in (container) or that hosts a service (services).

Credentials

Credentials for a private container registry (credentials), passed to docker login. Typically reference secrets, e.g. ${{ secrets.REGISTRY_PASSWORD }}.

Environment

The deployment environment a job targets (environment). Environments can carry protection rules and secrets configured in the repository settings.

GithubAction

The root model of a GitHub Actions workflow file (.github/workflows/*.yml). Serialize it with GithubActionWriter.

Job

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

Matrix

A matrix of variable combinations to run a job with (strategy.matrix).

On

A workflow trigger event (on). This is a discriminated union over the GitHub webhook events; construct the variant for the event you want, e.g. new On.Push { ... } or new On.Schedule(["0 6 * * 1"]). Enum member names intentionally match the lowercase/snake_case activity-type strings used in workflow YAML.

On.BranchProtectionRule

Triggers when a branch protection rule changes (branch_protection_rule).

On.CheckRun

Triggers on check run activity (check_run).

On.CheckSuite

Triggers on check suite activity (check_suite).

On.Create

Triggers when a branch or tag is created (create).

On.Delete

Triggers when a branch or tag is deleted (delete).

On.Deployment

Triggers when a deployment is created (deployment).

On.DeploymentStatus

Triggers when a deployment status is provided (deployment_status).

On.Discussion

Triggers on discussion activity (discussion).

On.DiscussionComment

Triggers on discussion comment activity (discussion_comment).

On.Fork

Triggers when the repository is forked (fork).

On.Gollum

Triggers when the wiki is updated (gollum).

On.ImageVersion

Triggers on runner image version events (image_version).

On.IssueComment

Triggers on issue/pull-request comment activity (issue_comment).

On.Issues

Triggers on issue activity (issues).

On.Label

Triggers on label activity (label).

On.MergeGroup

Triggers when a pull request is added to a merge queue (merge_group).

On.Milestone

Triggers on milestone activity (milestone).

On.PageBuild

Triggers when someone pushes to the GitHub Pages publishing branch (page_build).

On.Project

Triggers on classic project activity (project).

On.ProjectCard

Triggers on classic project card activity (project_card).

On.ProjectColumn

Triggers on classic project column activity (project_column).

On.Public

Triggers when the repository changes from private to public (public).

On.PullRequest

Triggers on pull request activity (pull_request), with optional branch/tag/path filters.

On.PullRequestReview

Triggers on pull request review activity (pull_request_review).

On.PullRequestReviewComment

Triggers on pull request review comment activity (pull_request_review_comment).

On.PullRequestTarget

Triggers on pull request activity, running in the context of the base of the pull request (pull_request_target). Use with care — the workflow has access to repository secrets.

On.Push

Triggers when commits or tags are pushed (push), with optional branch/tag/path filters. All filter properties are required so that omissions are explicit; pass null for filters you do not want.

On.RegistryPackage

Triggers on registry package activity (registry_package).

On.Release

Triggers on release activity (release).

On.RepositoryDispatch

Triggers on a custom webhook event sent via the GitHub API (repository_dispatch).

On.Schedule

Triggers on a schedule (schedule).

On.Status

Triggers when the status of a commit changes (status).

On.Watch

Triggers when the repository is starred (watch).

On.WorkflowCall

Allows the workflow to be called from another workflow (workflow_call), making it a reusable workflow.

On.WorkflowDispatch

Allows the workflow to be run manually from the GitHub UI or API (workflow_dispatch).

On.WorkflowRun

Triggers when another workflow runs (workflow_run).

On0MatchExtensions
Permissions

GITHUB_TOKEN permissions at workflow or job level (permissions). This is a discriminated union: use Permissions.All to grant one level to every scope (read-all / write-all), or Permissions.Exact to specify levels per scope.

Permissions.All

Grants the same Level to every permission scope, rendered as read-all or write-all.

Permissions.Exact

Grants explicit levels for individual permission scopes.

Permissions0MatchExtensions
PermissionsEvent

Per-scope GITHUB_TOKEN permission levels. Scopes left null are omitted from the YAML and fall back to GitHub's defaults.

RunsOn

The runner selection for a job (runs-on).

Snapshot

Runner image snapshot settings for a job (snapshot), used to capture the runner state as a custom image after the job completes.

Step

A single step within a job. This is a discriminated union: construct a Step.UsesStep to run an action or a Step.RunStep to run shell commands. The properties on this base record are shared by both variants.

Step.RunStep

A step that runs shell commands (run).

Step.UsesStep

A step that runs a reusable action (uses), e.g. actions/checkout@v4. Provide inputs via With.

Step0MatchExtensions
Strategy

The execution strategy for a job (strategy), defining a matrix of variations to run.

WorkflowDispatchInput

A typed input for the workflow_dispatch trigger. This is a discriminated union; construct WorkflowDispatchInput.String, WorkflowDispatchInput.Number, WorkflowDispatchInput.Boolean, or WorkflowDispatchInput.Choice for the desired input type.

WorkflowDispatchInput.Boolean

A true/false input (type: boolean).

WorkflowDispatchInput.Choice

A dropdown input restricted to a set of options (type: choice).

WorkflowDispatchInput.Number

A numeric input (type: number).

WorkflowDispatchInput.String

A free-text input (type: string).

WorkflowDispatchInput0MatchExtensions

Enums

On.BranchProtectionRule.BranchProtectionType

Activity types for the branch_protection_rule event.

On.CheckRun.CheckRunType

Activity types for the check_run event.

On.CheckSuite.CheckSuiteType

Activity types for the check_suite event.

On.Discussion.DiscussionType

Activity types for the discussion event.

On.DiscussionComment.DiscussionCommentType

Activity types for the discussion_comment event.

On.IssueComment.IssueCommentType

Activity types for the issue_comment event.

On.Issues.IssuesType

Activity types for the issues event.

On.Label.LabelType

Activity types for the label event.

On.MergeGroup.MergeGroupType

Activity types for the merge_group event.

On.Milestone.MilestoneType

Activity types for the milestone event.

On.Project.ProjectType

Activity types for the project event.

On.ProjectCard.ProjectCardType

Activity types for the project_card event.

On.ProjectColumn.ProjectColumnType

Activity types for the project_column event.

On.PullRequest.PullRequestType

Activity types for the pull_request event.

On.PullRequestReview.PullRequestReviewType

Activity types for the pull_request_review event.

On.PullRequestReviewComment.PullRequestReviewCommentType

Activity types for the pull_request_review_comment event.

On.PullRequestTarget.PullRequestTargetType

Activity types for the pull_request_target event.

On.RegistryPackage.RegistryPackageType

Activity types for the registry_package event.

On.Release.ReleaseType

Activity types for the release event.

On.Watch.WatchType

Activity types for the watch event.

On.WorkflowRun.WorkflowDispatchTypes

Activity types for the workflow_run event.

PermissionsLevel

The access level granted to a GITHUB_TOKEN permission scope.