Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/actionify/src/job.ts>Job#container

Create and manage your GitHub workflows with TypeScript and Deno.
Latest
method Job.prototype.container
import { Job } from "https://deno.land/x/actionify@0.3.0/src/job.ts";

::: Note

Note: If your workflows use Docker container actions, job containers, or service containers, then you must use a Linux runner:

  • If you are using GitHub-hosted runners, you must use an Ubuntu runner.
  • If you are using self-hosted runners, you must use a Linux machine as your runner and Docker must be installed.

:::

Use jobs.<job_id>.container to create a container to run any steps in a job that don't already specify a container. If you have steps that use both script and container actions, the container actions will run as sibling containers on the same network with the same volume mounts.

If you do not set a container, all steps will run directly on the host specified by runs-on unless a step refers to an action configured to run in a container.

:: Note

Note: The default shell for run steps inside a container is sh instead of bash. This can be overridden with jobs.<job_id>.defaults.run or jobs.<job_id>.steps[*].shell.

::

Parameters

container: WithContext<ContainerOptions<Env>, Base, "jobs:jobId:container" | "jobs:jobId:container:env:envId" | "jobs:jobId:container:credentials">