gc-ai-workflows repository provides standardized, reusable GitHub Actions workflows and actions for Python AI/ML projects using uv for package management. These components ensure consistency across all agent projects.
[!IMPORTANT]
Always use secrets: inherit when calling reusable workflows to pass secrets to the called workflow.
Reusable workflows
Build and publish
A comprehensive workflow that builds Docker images, runs quality checks, performs security scanning, and publishes to Azure Container Registry. Workflow:backbase-common/gc-ai-workflows/.github/workflows/build-publish.yaml@main
Usage
Input parameters
Output parameters
image: Full Docker image reference
Workflow steps
- Setup project environment
- Check action SHA pinning
- Code quality checks (pylint, pytest, hadolint)
- Optional: Setup and run Promptfoo evaluation
- Optional: Run Promptfoo redteaming
- Optional: Run SonarCloud analysis
- Build Docker image
- Security check (Trivy image scan)
- Push Docker image to Azure ACR
Pull request check
A comprehensive validation workflow for pull requests that runs code quality checks, tests, security scans, and optional promptfoo evaluations. Workflow:backbase-common/gc-ai-workflows/.github/workflows/pull-request-check.yaml@main
Usage
Input parameters
Workflow steps
- Setup project environment
- Check action SHA pinning
- Code quality checks (pylint, pytest, hadolint)
- Optional: Setup and run Promptfoo evaluation
- Optional: Run Promptfoo redteaming
- Optional: Run SonarCloud analysis
- Security check (filesystem scan)
Reusable actions
Setup project
Sets up the Python project environment, including checkout, Python installation,uv setup, dependency installation, and version resolution.
Action: backbase-common/gc-ai-workflows/setup-project@main
Usage
Input parameters
Output parameters
version: Raw version fromuv versionreleaseVersion: Release version (without dev/alpha/beta/rc)nextVersion: Next version (incremented patch with .dev0)devVersion: Development version with branch and commit infobuildVersion: Build version (release or dev)isStable: Whether this is a stable versionmajor,minor,patch: Version componentsname: Project name from git repositoryprojectKey: Sonar project keyorganization: GitHub organizationgithubToken: Generated GitHub App token
Code quality
Runs code quality checks including pylint, pytest, and hadolint. Action:backbase-common/gc-ai-workflows/code-quality@main
Usage
Input parameters
Sonar check
Runs SonarCloud analysis on Python projects. Action:backbase-common/gc-ai-workflows/sonar-check@main
Usage
Input parameters
Security check
Performs security checks of artifact dependencies and Docker images with Trivy vulnerability scanner. Action:backbase-common/gc-ai-workflows/security-check@main
Usage
Input parameters
Output parameters
sbomPath: Path to generated SBOM
Promptfoo evaluation
Runs promptfoo evaluation against agent endpoints. Only runs if promptfoo config files have changed. Action:backbase-common/gc-ai-workflows/promptfoo-evaluation@main
[!TIP] See the Promptfoo Configuration section for detailed setup instructions, including provider files, prompt functions, and test configuration.
Usage
Input parameters
Promptfoo redteaming
Runs promptfoo redteaming evaluation against a local FastAPI server. Action:backbase-common/gc-ai-workflows/promptfoo-redteaming@main
[!TIP] See the Redteam Configuration section for detailed setup instructions, including redteam.yaml structure, plugins, and testing configuration.
Usage
Input parameters
Build Docker image
Builds Docker images locally without pushing to a registry. Use this before running security checks. Action:backbase-common/gc-ai-workflows/build-docker@main
Usage
Input parameters
Output parameters
image: Full Docker image reference
Push Docker image
Pushes Docker images to Azure Container Registry. Use this after building and running security checks. Action:backbase-common/gc-ai-workflows/push-docker@main
Usage
Input parameters
Create release draft
Prepares release draft by merging branches, updating versions, creating tags, and generating release notes using release-drafter. Action:backbase-common/gc-ai-workflows/create-release-draft@main
[!NOTE]
Requires .github/release-drafter.yml configuration file.
Usage
Input parameters
Output parameters
releaseVersion: Result release version
Provision Python project
Provisions a Python project template by updatingpyproject.toml with the correct package name, version, description, and URLs. Also creates initial CHANGELOG.md and README.md files.
Action: backbase-common/gc-ai-workflows/provision-python-project@main
Usage
Input parameters
What it does
- Updates
pyproject.tomlwith package name, version, description, and URLs - Regenerates
uv.lockfile - Creates
CHANGELOG.mdwith initial version entry - Creates/updates
README.mdwith build badges and SonarCloud integration - Commits and pushes all changes to both base and main branches
Validate pull request body
Validates pull request body description and content against the PR template. Action:backbase-common/gc-ai-workflows/validate-pull-request-body@main
[!NOTE]
Requires .github/pull_request_template.md file.
Usage
Input parameters
Check action SHA pinning
Validates that external GitHub Actions are pinned to SHA versions for security.
[!IMPORTANT]
This action will not raise an exception in default configuration and validates actions and workflows in .github folder by default.
Action: backbase-common/gc-ai-workflows/check-action-pinning@main
Usage
Input parameters
Output parameters
valid: Validation result ("true"or"false")violations: List of violations in format:file path:external action, comma-separated
Resolve metadata
Resolves project version and metadata frompyproject.toml using uv version.
Action: backbase-common/gc-ai-workflows/resolve-metadata@main
Usage
Output parameters
version: Raw version fromuv versionreleaseVersion: Release version (without dev/alpha/beta/rc)nextVersion: Next version (incremented patch with .dev0)devVersion: Development version with branch and commit infobuildVersion: Build version (release or dev)isStable: Whether this is a stable versionmajor,minor,patch: Version componentsname: Project name from git repositoryprojectKey: Sonar project keyorganization: GitHub organization
Setup promptfoo
Sets up Node.js and installs promptfoo globally for LLM prompt evaluation. Action:backbase-common/gc-ai-workflows/setup-promptfoo@main