Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

CI Workflows

Goal

Keep CI workflow files synchronized with devflow.toml policy and command contracts.

ci:generate

dwf ci:generate

What it does:

If you modify config locally and run ci:generate again, it re-syncs the workflow file.

Custom output path:

dwf --ci-output .github/workflows/devflow-ci.yml ci:generate

Preview without writing:

dwf --stdout ci:generate

ci:check

dwf ci:check

What it checks:

If drift is detected, run:

dwf ci:generate

ci:plan

dwf ci:plan

Shows configured target profile names (pr, main, release, custom profiles).

Security Hardening (Least Privilege)

Devflow’s generated CI workflows follow the Principle of Least Privilege. By default, the GITHUB_TOKEN is restricted to:

permissions:
  contents: read

This ensures that CI jobs can checkout code and read repository metadata but cannot accidentally write back to the repository (e.g., creating tags, publishing releases, or modifying issues) unless explicitly granted per-job or per-step permissions.

Execution Environment

Shell Requirements

The generated workflow requires /bin/bash for advanced parallel execution tracking. This is handled automatically by the containerized environment (Debian-based), but ensures that process PIDs are tracked correctly during the verify phase.

Parallel Execution

To optimize CI speed, Devflow executes checks in parallel within the same container. This is managed by a background process tracking script:

  1. Starts checks in the background (&).

  2. Collects PIDs (pids+=($!)).

  3. Waits for all PIDs and accumulates exit codes.

  4. Fails the job if any check fails.