Reusable GitHub Actions workflows that support OpenTofu/Terraform module automation live here. Each workflow is designed to be called from other pipelines via workflow_call.
| Workflow | Category | Description |
|---|---|---|
| branch-validation | π CI & Validation | Validates branch names against a regex pattern |
| changelog-release | π¦ Release & Changelog | Generates changelog and creates release |
| conventional-commit | π CI & Validation | Validates commits against conventional commit rules |
| docker-build-push-ecr | π Build & Deploy | Builds and pushes Docker image to ECR |
| docker-security-scan | π Security | Scans Docker image for security vulnerabilities |
| ecr-security-scan | π Security | Scans ECR images for security vulnerabilities |
| pre-release | π¦ Release & Changelog | Posts changelog preview comment |
| readme-ai-v2 | π Documentation | Generates README files with AI |
| release | π¦ Release & Changelog | Creates release and updates README versions |
| tf-docs | π Documentation | Generates Terraform documentation |
| tfsec | π Security | Scans Terraform files for security vulnerabilities |
| tofu-lint | π CI & Validation | Lints Tofu configuration |
| tofu-test | π CI & Validation | Tests Tofu modules |
| update-readme-actions | π Documentation | Updates README with available actions |
Validates branch names against a regex pattern. Use this workflow to enforce consistent branch naming conventions.
- Inputs:
pattern: Regex pattern for branch name validation (default:^(feat|feature|fix|docs|style|refactor|perf|test|build|ci|chore|revert)/.+$)
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/branch-validation.yml@main
with:
pattern: '^(feat|feature|fix|docs|style|refactor|perf|test|build|ci|chore|revert)/.+$'Validates commits against conventional commit rules. Use this workflow to enforce consistent commit messages.
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/conventional-commit.yml@mainLints Tofu configuration. Use this workflow to ensure Tofu configuration is valid and consistent.
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/tofu-lint.yml@mainTests Tofu modules. Use this workflow to ensure Tofu modules are working as expected.
- Inputs:
modules: JSON array of module paths to test (required)tofu_version: OpenTofu version to use (default:1.10.6)
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/tofu-test.yml@main
with:
modules: '["module/a", "module/b"]'
tofu_version: '1.10.6'Scans Docker image for security vulnerabilities. Use this workflow to ensure Docker images are secure.
- Inputs:
context: Build context directory (required)dockerfile: Path to Dockerfile relative to context (default:Dockerfile)image_name: Name for the scanned image (required)severity: Minimum severity to report (default:CRITICAL,HIGH)exit_code: Exit code when vulnerabilities are found (default:1)upload_sarif: Upload SARIF results to GitHub Security tab (default:true)
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/docker-security-scan.yml@main
with:
context: .
dockerfile: Dockerfile
image_name: my-image
severity: CRITICAL,HIGH
exit_code: 1
upload_sarif: trueScans ECR images for security vulnerabilities. Use this workflow to ensure ECR images are secure.
- Inputs:
image_names: JSON array of image names to scan (required)ecr_registry: ECR registry URL (default:public.ecr.aws/nullplatform)severity: Minimum severity to report (default:CRITICAL,HIGH)
- Secrets required:
aws_role_arn: AWS IAM Role ARN for OIDC authenticationslack_webhook_url: Slack webhook URL for vulnerability alerts
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/ecr-security-scan.yml@main
with:
image_names: '["image/a", "image/b"]'
ecr_registry: public.ecr.aws/nullplatform
severity: CRITICAL,HIGH
secrets:
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}Scans Terraform files for security vulnerabilities. Use this workflow to ensure Terraform configuration is secure.
- Inputs:
minimum_severity: Minimum severity level to report (default:HIGH)upload_sarif: Upload SARIF results to GitHub Security tab (default:true)post_comment: Post comment on PR if scan fails (default:true)
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/tfsec.yml@main
with:
minimum_severity: HIGH
upload_sarif: true
post_comment: trueBuilds and pushes Docker image to ECR. Use this workflow to build and deploy Docker images.
- Inputs:
image_name: Name of the Docker image (required)context: Build context directory (required)dockerfile: Path to Dockerfile relative to context (default:Dockerfile)platforms: Target platforms for multi-arch build (default:linux/amd64,linux/arm64)ecr_registry: ECR registry URL (default:public.ecr.aws/nullplatform)tag: Additional tag for the image (default: ``)aws_region: AWS region for ECR (default:us-east-1)
- Secrets required:
aws_role_arn: AWS IAM Role ARN for OIDC authentication
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/docker-build-push-ecr.yml@main
with:
image_name: my-image
context: .
dockerfile: Dockerfile
platforms: linux/amd64,linux/arm64
ecr_registry: public.ecr.aws/nullplatform
tag: latest
aws_region: us-east-1
secrets:
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}Generates changelog and creates release. Use this workflow to automate changelog generation and release creation.
- Inputs:
project-type: Type of project (default:generic)source-dir: Directory containing packages/charts (default:.)version-file: Version file name (default: ``)tag-prefix: Prefix for git tags (default: ``)create-github-release: Create a GitHub Release (default:true)commit-message: Commit message for version bump (default:chore(release): bump version and update changelog [skip ci])
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/changelog-release.yml@main
with:
project-type: generic
source-dir: .
version-file: VERSION
tag-prefix: v
create-github-release: true
commit-message: chore(release): bump version and update changelog [skip ci]Posts changelog preview comment. Use this workflow to post a changelog preview comment before release.
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/pre-release.yml@mainCreates release and updates README versions. Use this workflow to automate release creation and README updates.
- Inputs:
update_readme_versions: Update version references in README files after release (default:true)
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/release.yml@main
with:
update_readme_versions: trueGenerates README files with AI. Use this workflow to automate README generation.
- Inputs:
base_dir: Base directory to search for projects (default:.)generator_type: Force generator type (default: ``)generate_all: Generate README for all projects (default:false)file_patterns: File patterns to detect changes (default:*.tf *.ts *.tsx *.js *.jsx *.py)ai_provider: AI provider (default:groq)ai_model: AI model to use (default: ``)run_post_generation: Commands to run after generation (default: ``)
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/readme-ai-v2.yml@main
with:
base_dir: .
generator_type: terraform
generate_all: false
file_patterns: *.tf
ai_provider: groq
ai_model:
run_post_generation: Generates Terraform documentation. Use this workflow to automate Terraform documentation generation.
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/tf-docs.yml@mainUpdates README with available actions. Use this workflow to automate README updates with available actions.
- Inputs:
ai_provider: AI provider to use (default:groq)ai_model: AI model to use (default: ``)
- Usage:
uses: nullplatform/actions-nullplatform/.github/workflows/update-readme-actions.yml@main
with:
ai_provider: groq
ai_model: This README is automatically generated using AI. The update-readme-actions workflow reads all workflow files and generates documentation using your configured AI provider.
| Provider | Secret for API Key | Default Model |
|---|---|---|
groq |
GROQ_API_KEY |
llama-3.3-70b-versatile |
github |
GITHUB_TOKEN |
gpt-4o |
openai |
OPENAI_API_KEY |
gpt-4o |
anthropic |
ANTHROPIC_API_KEY |
claude-sonnet-4-20250514 |
To configure the AI provider, add these secrets in Settings β Secrets and variables β Actions:
AI_PROVIDER- Provider to use:groq,github,openai, oranthropicAI_MODEL- (Optional) Specific model to use- The API key secret for your chosen provider (e.g.,
GROQ_API_KEY)
Example for Groq:
AI_PROVIDER = groq
GROQ_API_KEY = gsk_xxx...
Example for Anthropic Claude:
AI_PROVIDER = anthropic
ANTHROPIC_API_KEY = sk-ant-xxx...
AI_PROVIDER=groq GROQ_API_KEY=xxx node .github/scripts/update-actions-readme.jsIf you want to add or modify a module:
- Create a
feature/orfix/branch. - Add tests or validations if applicable.
- Update or generate documentation for the affected module.
- Open a Pull Request for review.