INNER CODE UNIT · Python

_set_github_outputs

nielsfaber/scheduler-card · scripts/cleanup_translations.py:246

def _set_github_outputs(changed: bool, summary: str) -> None:
    """Write step outputs when running inside GitHub Actions."""
    github_output = os.environ.get("GITHUB_OUTPUT")
    if not github_output:
        return
    with open(github_output, "a", encoding="utf-8") as f:
        f.write(f"changed={'true' if changed else 'false'}\n")
        if changed:
            f.write("summary<<GH_OUTPUT_EOF\n")
            f.write(summary)
            f.write("GH_OUTPUT_EOF\n")


if __name__ == "__main__":
    sys.exit(main())

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…