Skip to content

CICD-019 · Run work inside a job container ​

Encyclopedia · Jobs, steps and runner selection · All snippets

Previous · CICD-018 · Next · CICD-020

1. Where it fits ​

  • Placement .github/workflows/ci.yml, inside the relevant job.
  • Prerequisites workflow containing the named example jobs or steps.
  • Platforms github-actions, gitea-actions.

2. Copy the snippet ​

yaml
runs-on: ubuntu-latest
container: node:22-bookworm
steps:
  - run: node --version

3. How it works ​

The runner starts a job container and executes the steps in it. The selected image supplies Node, while runner support and shell availability still matter.

4. Verify the result ​

A container-capable Linux runner is required. Verify the image actually provides the executable.

Validation syntax-validated (YAML parse). Status definitions.