Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
db92d74ee5
commit
37e24de5c8
1 changed files with 33 additions and 0 deletions
33
.forgejo/workflows/ansible-docsmith.yaml
Normal file
33
.forgejo/workflows/ansible-docsmith.yaml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
on:
|
||||
- push
|
||||
|
||||
jobs:
|
||||
ansible-docsmith:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install ansile-docsmith
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install ansible-docsmith==2.0.0
|
||||
|
||||
- name: Run ansible-docsmith
|
||||
run: ansible-docsmith generate .
|
||||
|
||||
- name: Verify changes
|
||||
run: |
|
||||
set -e
|
||||
git diff > diff.txt
|
||||
CHANGES=$(wc -l diff.txt | awk '{ print $1 }')
|
||||
echo "Number of changes: ${CHANGES}"
|
||||
if [ ${CHANGES} -gt 0 ] ; then
|
||||
echo ""
|
||||
cat diff.txt
|
||||
echo ""
|
||||
echo "Fix with the following command:"
|
||||
echo ""
|
||||
echo "run ansible-docsmith generate ${role_dir}"
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue