Skip to main content
The following sections document all configuration files, secrets, and templates required to set up and run CI/CD workflows for AI agents.

Required secrets

The following secrets must be configured in your GitHub repository or organization:

Configuration files

Release drafter

The create-release-draft action uses release-drafter to automatically generate changelogs and release notes. Create .github/release-drafter.yml in your repository:

Configuration options

  • name-template: Release name format (uses resolved version)
  • tag-template: Git tag format (uses resolved version)
  • categories: Groups PRs by labels for changelog organization
  • change-template: Format for each changelog entry
  • exclude-labels: Labels to exclude from changelog
  • exclude-contributors: Bot accounts to exclude
  • version-resolver: Determines version bump based on labels
  • autolabeler: Automatically labels PRs based on branch name
  • template: Release notes template

Pull request template

The validate-pull-request-body action validates PR descriptions against a template. Create .github/pull_request_template.md in your repository:

Template requirements

The PR template should include:
  • Description section: Summary of changes and context
  • Checklist: Required items to verify before PR is ready
  • Comments: Instructions for reviewers
The validation action checks that:
  • PR body is not empty
  • Required checklist items are completed (or marked N/A)
  • Description provides sufficient context

Python version configuration

Specify Python version in two ways:

1. Via input parameter

2. Via .python-version file

Create a .python-version file in your repository root:
The .python-version file takes precedence if both are specified.

Hadolint configuration

Create .hadolint.yaml in your repository root to configure hadolint rules for Dockerfile linting:

Configuration options

  • ignored: Rules to completely ignore
  • override: Override severity levels for specific rules
  • trustedRegistries: Docker registries to trust

Codeowners file

The release draft workflow requires a .github/CODEOWNERS file to verify code owner permissions. Create this file to specify who can trigger release workflows:

Format

  • Use * for global ownership
  • Use paths for specific file/directory ownership
  • Use @username or @team-name for owners
  • Multiple owners can be specified per line

Version management

The workflows use uv for version management. Versions are read from pyproject.toml and can be:
  • Stable versions: 1.2.3 (no suffixes)
  • Development versions: 1.2.3.dev0 (with dev suffix)

Version format

Versions follow semantic versioning (SemVer):

Stable versions

  • Major: Breaking changes (e.g., 1.0.02.0.0)
  • Minor: New features, backward compatible (e.g., 1.0.01.1.0)
  • Patch: Bug fixes, backward compatible (e.g., 1.0.01.0.1)

Development versions

Development versions include a suffix indicating they are pre-release:
  • Format: {major}.{minor}.{patch}.dev0 (e.g., 1.2.3.dev0)
  • Purpose: Indicates work-in-progress or pre-release state
  • Usage: Automatically used during development on feature branches
  • Release Process: Development versions are converted to stable versions during release (e.g., 1.2.3.dev01.2.3)

Prompt management

Best Practice: Keep all prompts in the prompts/* directory (typically prompts/prompts.py) and read them from there for both your agents and promptfoo evaluation. This ensures that:
  • Prompts can be version-controlled and tracked
  • Prompts are testable through promptfoo evaluation
  • Prompts remain consistent between agent execution and evaluation
  • Changes to prompts are easily reviewable in pull requests
When configuring promptfoo evaluation, reference prompts from the prompts/ directory using the file:// protocol, as shown in the evaluation config example in the Promptfoo Configurations section.

Promptfoo configurations

Promptfoo handles LLM prompt evaluation and redteaming. Redteam testing uses Promptfoo’s redteaming capabilities to test for security vulnerabilities and adversarial inputs.

Evaluations config file

Each agent should have its own configuration file in promptfoo_config/. Example structure:

Redteam config file

Create redteam.yaml in your repository root:

Quick setup checklist

Your repository should have the following structure for CI/CD workflows:

Setup tasks

  • Configure all required secrets in GitHub repository/organization
  • Create .github/release-drafter.yml for release notes
  • Create .github/pull_request_template.md for PR validation
  • Create .github/CODEOWNERS for release permissions
  • Create .python-version file (or specify in workflow)
  • Create .hadolint.yaml for Dockerfile linting (optional)
  • Configure promptfoo_config/*.yaml for prompt evaluation (if using)
  • Create provider files in providers/ directory (if using promptfoo eval)
  • Create prompt functions in prompts/prompts.py (if using promptfoo eval)
  • Configure redteam.yaml for redteaming tests (if using promptfoo redteaming)

Next steps