[Python] How to pass output from a GitHub Action step that is in python?

Discussão em 'Python' iniciado por Stack, Junho 24, 2025.

  1. Stack

    Stack Membro Participativo

    My script produces JSON

    print(json.dumps(teams_roles, indent=2))
    with open(os.environ['GITHUB_OUTPUT'], 'w') as outfile:
    json.dump(teams_roles, outfile, indent=2)


    I tried this way, but got error

    "gr_almn_slt-pct-chkap_ctm": {
    "s614170-priqa_jeb": "maintainer",
    "e800000-priqa_jeb": "maintainer",
    "e800445-priqa_jeb": "maintainer"
    }
    Error: Unable to process file command 'output' successfully.
    Error: Invalid format '{'


    How to export multiline JSON as output?

    Continue reading...

Compartilhe esta Página