Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/role-readme-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# .github/workflows/role-readme-check.yml
#
# Ansible Galaxy requires every role to have its own README. This job fails the build
# (blocking merge to dev) if any directory under roles/ is missing one.
name: role-readme-check
on:
push:
branches: ["dev"]
pull_request:
branches: ["dev"]
jobs:
check-role-readmes:
name: Role READMEs # Naming the build is important to use it as a status check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify every role has a README
run: |
missing=0
for dir in roles/*/; do
role=$(basename "$dir")
if ! ls "$dir" 2>/dev/null | grep -qi '^readme'; then
echo "::error::Role '$role' is missing a README (required by Ansible Galaxy)"
missing=1
fi
done
exit "$missing"
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ The `.ansible-lint` config warns (not errors) on:
| Workflow | Trigger | Purpose |
|----------|---------|---------|
| `ansible-lint.yml` | push/PR to `main` | Lint validation |
| `role-readme-check.yml` | push/PR to `dev` | Fails the build if any `roles/*/` directory is missing a README (Ansible Galaxy requirement) |
| `publish_ansible_collection.yml` | GitHub release or manual | Bump version, update CHANGELOG, publish to Galaxy |

The publish workflow reads the version from the git tag (`v1.0.1` → `1.0.1`), writes it into
Expand Down
Loading