Check ansible-output from CI instead of updating.

This commit is contained in:
Felix Fontein 2025-07-19 12:17:03 +02:00
commit 6d60fd4f7e

View file

@ -6,10 +6,14 @@
# dependencies = ["nox>=2025.02.09", "antsibull-nox"]
# ///
import os
import sys
import nox
# Whether the noxfile is running in CI:
IN_CI = os.environ.get("CI") == "true"
try:
import antsibull_nox
@ -43,7 +47,10 @@ def ansible_output(session: nox.Session) -> None:
# Tools for post-processing
"ruamel.yaml", # used by docs/docsite/reformat-yaml.py
)
session.run("antsibull-docs", "ansible-output", *session.posargs)
args = []
if IN_CI:
args.append("--check")
session.run("antsibull-docs", "ansible-output", *args, *session.posargs)
# Allow to run the noxfile with `python noxfile.py`, `pipx run noxfile.py`, or similar.