Merge pull request #123 from linkorb/refactor-single-bulk-playbooks-0000 #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto-update README.md | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'repo.schema.yaml' | |
- 'docs/partials/**.md' | |
- 'templates/README.md.j2' | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# XXX ansible installed within GitHub Runner via pipx, which doesn't support direct installation from a file | |
# like pip does. See https://github.com/pypa/pipx/issues/934 | |
- name: install repo-ansible dependencies | |
run: pipx inject ansible-core jsonschema | |
- name: generate schema README table (markdown partial) | |
run: python3 library/schema_to_docs_partial.py | |
- name: run ansible playbook | |
run: ansible-playbook apply.yaml | |
env: | |
ANSIBLE_DISPLAY_OK_HOSTS: 0 | |
ANSIBLE_DISPLAY_SKIPPED_HOSTS: 0 | |
- name: commit README.md changes | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add README.md docs/partials | |
if git commit -m "chore: auto-update README.md"; then | |
git push | |
fi |