mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-29 18:55:14 +08:00
Write to GITHUB_STEP_SUMMARY
This commit is contained in:
parent
76a7e667de
commit
87ddb134a4
15
.github/workflows/cura-installer.yml
vendored
15
.github/workflows/cura-installer.yml
vendored
@ -275,14 +275,11 @@ jobs:
|
||||
|
||||
- name: Summarize the used Conan dependencies
|
||||
shell: python
|
||||
env:
|
||||
FULL_INSTALLER_FILENAME: ${{ steps.filename.outputs.FULL_INSTALLER_FILENAME }}
|
||||
run: |
|
||||
import os
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
|
||||
conan_install_info_path = Path("cura_inst/conan_install_info.json")
|
||||
conan_info = {"installed": []}
|
||||
if os.path.exists(conan_install_info_path):
|
||||
@ -290,15 +287,15 @@ jobs:
|
||||
conan_info = json.load(f)
|
||||
sorted_deps = sorted([dep["recipe"]["id"] for dep in conan_info["installed"]])
|
||||
|
||||
output_env = os.environ["GITHUB_OUTPUT"]
|
||||
summary_env = os.environ["GITHUB_STEP_SUMMARY"]
|
||||
content = ""
|
||||
if os.path.exists(output_env):
|
||||
with open(output_env, "r") as f:
|
||||
if os.path.exists(summary_env):
|
||||
with open(summary_env, "r") as f:
|
||||
content = f.read()
|
||||
|
||||
with open(output_env, "w") as f:
|
||||
with open(summary_env, "w") as f:
|
||||
f.write(content)
|
||||
f.writelines(f"# { os.environ['FULL_INSTALLER_FILENAME'] } uses:\n")
|
||||
f.writelines("# ${{ steps.filename.outputs.FULL_INSTALLER_FILENAME }} uses:\n")
|
||||
for dep in sorted_deps:
|
||||
f.writelines(f"{dep}\n")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user