Using Python to Set GitHub Action Outputs
The output format of GitHub Action is to write {name}={value}
to the environment variable GITHUB_OUTPUT
[1][2] This article shares how to set up the GitHub Action output using Python. The main content comes from this discussion[3].
Singleline
1 |
|
Multiline
1 |
|
Just call it with
1 |
|
References
- Workflow commands for GitHub Actions. Archived on 2024-09-06. Retrieved 2024-09-06. ↩
- GitHub Actions: Deprecating save-state and set-output commands. Archived on 2024-09-06. Retrieved 2024-09-06. ↩
- How to set-output from a python script in Github workflow step. #28146. Archived on 2024-09-06. Retrieved 2024-09-06. ↩
Using Python to Set GitHub Action Outputs
https://blog.zhanganzhi.com/en/2024/09/a2d3aacb3fc0/