Revert to recompile_requirements.py with set-output

Newlines don't work anymore, see #7459

Partially reverts 0ff0eaa, see #7439
This commit is contained in:
Florian Bruhin 2022-11-03 14:58:27 +01:00
parent 0ff0eaa703
commit 80cf0c5bdd
1 changed files with 10 additions and 9 deletions

View File

@ -335,15 +335,16 @@ def print_changed_files():
print(changes_text)
if utils.ON_CI:
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as f:
f.write('changed=' + files_text.replace('\n', '%0A'))
table_header = [
'| File | Requirement | old | new |',
'|------|-------------|-----|-----|',
]
diff_table = '%0A'.join(
table_header + [change.table_str() for change in changes])
f.write(f'diff={diff_table}')
print()
print('::set-output name=changed::' +
files_text.replace('\n', '%0A'))
table_header = [
'| File | Requirement | old | new |',
'|------|-------------|-----|-----|',
]
diff_table = '%0A'.join(table_header +
[change.table_str() for change in changes])
print('::set-output name=diff::' + diff_table)
def get_host_python(name):