From: Sebastián Ramírez Date: Mon, 20 Jul 2020 14:47:48 +0000 (+0200) Subject: 🐛 Fix Watch Previews action X-Git-Tag: 0.60.0~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e0080e5f75b3f58309222591c529e4dbf1dcc895;p=thirdparty%2Ffastapi%2Ffastapi.git 🐛 Fix Watch Previews action --- diff --git a/.github/actions/watch-previews/app/main.py b/.github/actions/watch-previews/app/main.py index fca8a78005..51318e7125 100644 --- a/.github/actions/watch-previews/app/main.py +++ b/.github/actions/watch-previews/app/main.py @@ -67,6 +67,7 @@ if __name__ == "__main__": notified = True logging.info(f"Docs preview was notified: {notified}") if not notified: + artifact_name = f"docs-zip-{commit}" response = httpx.get( f"{github_api}/repos/{settings.github_repository}/actions/artifacts", headers=headers, @@ -75,7 +76,7 @@ if __name__ == "__main__": artifacts_response = ArtifactResponse.parse_obj(data) use_artifact: Optional[Artifact] = None for artifact in artifacts_response.artifacts: - if artifact.name == settings.input_name: + if artifact.name == artifact_name: use_artifact = artifact break if use_artifact: @@ -85,7 +86,7 @@ if __name__ == "__main__": headers=headers, json={ "ref": "master", - "inputs": {"pr": f"{pr.number}", "name": f"docs-zip-{commit}"}, + "inputs": {"pr": f"{pr.number}", "name": artifact_name}, }, ) logging.info(