mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-11 13:06:43 +00:00
🔊 Add more logging to Watch Preview when artifact is not found
This commit is contained in:
parent
7b3ef43127
commit
11c05beece
1 changed files with 8 additions and 2 deletions
10
.github/actions/watch-previews/app/main.py
vendored
10
.github/actions/watch-previews/app/main.py
vendored
|
|
@ -79,14 +79,20 @@ if __name__ == "__main__":
|
||||||
if artifact.name == artifact_name:
|
if artifact.name == artifact_name:
|
||||||
use_artifact = artifact
|
use_artifact = artifact
|
||||||
break
|
break
|
||||||
if use_artifact:
|
if not use_artifact:
|
||||||
|
logging.info(f"Artifact not available")
|
||||||
|
else:
|
||||||
logging.info(f"Existing artifact: {use_artifact.name}")
|
logging.info(f"Existing artifact: {use_artifact.name}")
|
||||||
response = httpx.post(
|
response = httpx.post(
|
||||||
"https://api.github.com/repos/tiangolo/fastapi/actions/workflows/preview-docs.yml/dispatches",
|
"https://api.github.com/repos/tiangolo/fastapi/actions/workflows/preview-docs.yml/dispatches",
|
||||||
headers=headers,
|
headers=headers,
|
||||||
json={
|
json={
|
||||||
"ref": "master",
|
"ref": "master",
|
||||||
"inputs": {"pr": f"{pr.number}", "name": artifact_name, "commit": commit},
|
"inputs": {
|
||||||
|
"pr": f"{pr.number}",
|
||||||
|
"name": artifact_name,
|
||||||
|
"commit": commit,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
logging.info(
|
logging.info(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue