Skip to content

Commit 6d60fd4

Browse files
committed
Check ansible-output from CI instead of updating.
1 parent 0741b65 commit 6d60fd4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

noxfile.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66
# dependencies = ["nox>=2025.02.09", "antsibull-nox"]
77
# ///
88

9+
import os
910
import sys
1011

1112
import nox
1213

14+
# Whether the noxfile is running in CI:
15+
IN_CI = os.environ.get("CI") == "true"
16+
1317

1418
try:
1519
import antsibull_nox
@@ -43,7 +47,10 @@ def ansible_output(session: nox.Session) -> None:
4347
# Tools for post-processing
4448
"ruamel.yaml", # used by docs/docsite/reformat-yaml.py
4549
)
46-
session.run("antsibull-docs", "ansible-output", *session.posargs)
50+
args = []
51+
if IN_CI:
52+
args.append("--check")
53+
session.run("antsibull-docs", "ansible-output", *args, *session.posargs)
4754

4855

4956
# Allow to run the noxfile with `python noxfile.py`, `pipx run noxfile.py`, or similar.

0 commit comments

Comments
 (0)