GitHub Actions Validator - Example Workflows
This directory contains example workflow files for testing the GitHub Actions Validator skill.
Overview
GitHub Actions Validator - Example Workflows
This directory contains example workflow files for testing the GitHub Actions Validator skill.
Files
valid-ci.yml
A complete, valid CI pipeline that passes all validation checks.
Purpose: Test successful validation flow
Usage:
bash scripts/validate_workflow.sh examples/valid-ci.yml
Expected Result: All validations pass
with-errors.yml
A workflow containing common intentional errors for testing error detection.
Purpose: Test error detection and reference file consultation
Errors included (4 total, all caught by actionlint):
- Invalid CRON expression (day 8 doesn't exist) —
[events] - Typo in runner label (
ubuntu-lastestinstead ofubuntu-latest) —[runner-label] - Script injection vulnerability (untrusted input in script) —
[expression] - Undefined job dependency (
biuldinstead ofbuild) —[job-needs]
Usage:
bash scripts/validate_workflow.sh examples/with-errors.yml
Expected Result: Multiple errors reported by actionlint
outdated-versions.yml
A workflow using older action versions to test version validation.
Purpose: Test action version checking
Version issues included:
actions/checkout@v4- OUTDATED (current: v6)actions/setup-node@v4- OUTDATED (current: v6)actions/upload-artifact@v3- DEPRECATED (minimum: v4)docker/build-push-action@v5- OUTDATED (current: v6)
Usage:
bash scripts/validate_workflow.sh --check-versions examples/outdated-versions.yml
Expected Result: Version warnings for outdated actions
Testing Workflow
-
Test successful validation:
bash scripts/validate_workflow.sh examples/valid-ci.yml -
Test error detection:
bash scripts/validate_workflow.sh examples/with-errors.yml -
Test version checking:
bash scripts/validate_workflow.sh --check-versions examples/outdated-versions.yml -
Test all examples:
for file in examples/*.yml; do echo "=== Testing: $file ===" bash scripts/validate_workflow.sh --lint-only "$file" echo "" done