Skip to content

Commit

Permalink
Reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
danudey committed Jan 26, 2024
1 parent 31bd13c commit 1392cec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.7
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: "3.7"
python-version: "3.12"

- uses: actions/checkout@v1

Expand Down
16 changes: 10 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import os
import requests # noqa We are just importing this to prove the dependency installed correctly

# Set the output value by writing to the outputs in the Environment File, mimicking the behavior defined here:
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
# Set the output value by writing to the outputs in the
# Environment File, mimicking the behavior defined here:
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter


def set_github_action_output(output_name, output_value):
f = open(os.path.abspath(os.environ["GITHUB_OUTPUT"]), "a")
f.write(f'{output_name}={output_value}')
f.close()
f.write(f"{output_name}={output_value}")
f.close()


def main():
my_input = os.environ["INPUT_MYINPUT"]

my_output = f'Hello {my_input}'
my_output = f"Hello {my_input}"

set_github_action_output('myOutput', my_output)
set_github_action_output("myOutput", my_output)


if __name__ == "__main__":
Expand Down

0 comments on commit 1392cec

Please sign in to comment.