Skip to content

container

container(input: WithMeta<ContainerInput>): ContainerModel

Create a container model for use as a job-level container.

The returned model maps to the jobs.<job_id>.container key in a GitHub Actions workflow YAML.

Parameter Type Description

input

WithMeta<ContainerInput>

Container configuration and optional metadata.

ContainerModel

A branded ContainerModel.

const pg = container({
image: "postgres:16",
env: { POSTGRES_PASSWORD: "postgres" },
ports: ["5432:5432"],
});