{"repo":"jannekem/run-python-script-action","free":true,"listed":false,"github":"https://github.com/jannekem/run-python-script-action","clone":"git clone https://github.com/jannekem/run-python-script-action.git","description":"Write Python scripts in an Actions workflow file","language":"Python","stars":55,"topics":["github-actions","python"],"license":"MIT","category":"workflow-automation","readme_excerpt":"Run Python Script Action Write Python scripts in an Actions workflow file! This action lets you define a custom Python script inside the workflow YAML file. Write your Python code as the script argument, and use the YAML multiline string feature to define multiline scripts. The only requirement is that you set up the Python environment before running the action. Here is an example workflow that prints the repository root directory contents to the Actions logs: Handling errors By default, the action will fail if it encounters any errors when trying to run your script. You can override this with the fail-on-error input. The action sets three outputs: - stdout contains any text that your program prints to the console - stderr contains any text that is routed to STDERR, such as exception messages - error is a string with either \"true\" or \"false\" depending on if errors were present or not, use this to check for errors when you opt not to fail the step Look at the following snippet to see how the error handling works in practice: Utility functions The action comes bundled with utilities that you can use to interact with the workflow. If you want to disable these utilities you can set util: false as an input for the step. You can call these functions directly from your script without having to import anything. Example: Add path Signature : add path(path) Prepend to the system path. The change will affect later steps only. Get input Signature : get input(name) Returns the value of th","default_branch":null,"files":null,"tree":[],"storefront":"/r/jannekem","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jannekem/run-python-script-action/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}