This directory contains GitHub Actions workflows for automating various aspects of the ComplianceAsCode Builder project.
This workflow runs on every push and pull request to validate that the containers build successfully and function properly.
What it does:
- Builds both minimal and full containers
- Tests that the build environment is correctly configured
- Verifies that content can be generated
This workflow publishes container images to GitHub Container Registry when changes are pushed to main or a tag is created.
What it does:
- Pushes minimal and full container images to ghcr.io
- Tags images appropriately based on version/branch
- Makes containers available for users without building locally
All workflows in this repository follow GitHub's security best practices:
-
Least Privilege Principle: Workflows are granted only the permissions they need to function:
- Build & Test workflows:
contents: read
,packages: read
- Publish workflows:
contents: read
,packages: write
- Build & Test workflows:
-
Secret Management: Sensitive data like certificates are handled using GitHub Secrets.
-
Pinned Action Versions: All external actions use specific versions instead of floating tags.
-
Workflow Token Permissions: GitHub's
GITHUB_TOKEN
is granted only required permissions.
For more information about GitHub Actions security, see the GitHub Actions documentation.
Pull the containers from GitHub Container Registry:
# Pull the full container (with pre-built content)
docker pull ghcr.io/mitre/cac-builder:full
# Pull the minimal container (for on-demand builds)
docker pull ghcr.io/mitre/cac-builder:minimal
# Run the container
docker run -it --rm -v ./output:/output ghcr.io/mitre/cac-builder:full bash
The publish workflow can be manually triggered from the GitHub Actions tab in the repository.
The following workflows are planned for future implementation:
- Content Build Workflow - Automatically builds SCAP content for all platforms
- Documentation Verification - Ensures documentation remains accurate
- Dependency Update Workflow - Keeps dependencies current
- Compliance Testing Workflow - Tests content against reference systems
See docs/workflow-options.md for more information.