Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
db92d74ee5
commit
85a9c857f9
1 changed files with 34 additions and 0 deletions
34
.forgejo/workflows/ansible-docsmith.yaml
Normal file
34
.forgejo/workflows/ansible-docsmith.yaml
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
on:
|
||||||
|
- push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ansible-docsmith:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install ansile-docsmith
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y python3-pip
|
||||||
|
pip install ansible-docsmith --break-system-packages
|
||||||
|
|
||||||
|
- 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