Documentation
¶
Overview ¶
Package workflow is a thin, intentionally boring wrapper around act's pkg/model. It exists so the rest of actl depends on our types and helpers, not directly on act's parsing surface — making the act version we stand on a single, swappable seam.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Discover ¶
Discover returns the workflow files under dir/.github/workflows, sorted. It matches GitHub's own convention (*.yml and *.yaml in that directory). A missing .github/workflows directory is not an error — it yields an empty slice, so the caller can give a friendly "no workflow found" message.
func JobEnvironment ¶
JobEnvironment returns the deployment environment a job targets (GHA's job-level `environment:` key), or "" when the job declares none. act's model drops this field entirely (model.Job has only `env:`, the env-var map — not the deployment environment), so actl reads it straight from the raw YAML. GHA allows two forms: a bare string (`environment: production`) or an object (`environment: {name: …}`); both yield the name. A missing job/file/key is "" with no error — the caller treats "no environment" the same whether the job lacks one or the file can't be read here (a real parse error surfaces in debugger.New).
Types ¶
type StepKind ¶
type StepKind string
StepKind is a human-facing label for how a step will execute. It collapses act's finer StepType enum into the v0.1 vocabulary we show in the TUI.
const ( KindRun StepKind = "run" // a shell script KindDocker StepKind = "docker" // uses: docker://... KindLocal StepKind = "local" // uses: ./path (composite or node, in-repo) KindRemote StepKind = "remote" // uses: owner/repo@ref (composite/node/docker) KindReusable StepKind = "reusable" // uses: a reusable workflow (out of v0.1 scope) KindInvalid StepKind = "invalid" // neither run nor uses, or both )