From d0fe108e0faab3d35169a129129a23788ac63336 Mon Sep 17 00:00:00 2001 From: Leo Stepanewk <44349262+leo-step@users.noreply.github.com> Date: Fri, 29 Jul 2022 01:36:23 -0400 Subject: [PATCH 1/3] try running python script --- .github/workflows/run-python.yml | 22 ++++++++++++++++++++++ test.py | 3 +++ 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/run-python.yml create mode 100644 test.py diff --git a/.github/workflows/run-python.yml b/.github/workflows/run-python.yml new file mode 100644 index 00000000..825f5f6e --- /dev/null +++ b/.github/workflows/run-python.yml @@ -0,0 +1,22 @@ +name: run-python + +on: workflow_dispatch + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: checkout repo content + uses: actions/checkout@v2 # checkout the repository content to github runner. + - name: setup python + uses: actions/setup-python@v2 + with: + python-version: 3.9 #install the python needed + - name: install dependencies + run: | + python -m pip install --upgrade pip + pip install requests + - name: execute script # run file + run: | + python test.py \ No newline at end of file diff --git a/test.py b/test.py new file mode 100644 index 00000000..29e0b2b6 --- /dev/null +++ b/test.py @@ -0,0 +1,3 @@ +import requests + +print(requests.get("https://www.google.com").text) \ No newline at end of file From 49d2b04aed732078aefbaf0ac77c41144430538d Mon Sep 17 00:00:00 2001 From: Leo Stepanewk <44349262+leo-step@users.noreply.github.com> Date: Fri, 29 Jul 2022 09:17:10 -0400 Subject: [PATCH 2/3] try to fix yml syntax error --- .github/workflows/run-python.yml | 6 +++--- test.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-python.yml b/.github/workflows/run-python.yml index 825f5f6e..875b0c4b 100644 --- a/.github/workflows/run-python.yml +++ b/.github/workflows/run-python.yml @@ -8,11 +8,11 @@ jobs: steps: - name: checkout repo content - uses: actions/checkout@v2 # checkout the repository content to github runner. + uses: actions/checkout@v3 # checkout the repository content to github runner. - name: setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4ß with: - python-version: 3.9 #install the python needed + python-version: '3.9' #install the python needed - name: install dependencies run: | python -m pip install --upgrade pip diff --git a/test.py b/test.py index 29e0b2b6..7cb9edeb 100644 --- a/test.py +++ b/test.py @@ -1,3 +1,3 @@ import requests -print(requests.get("https://www.google.com").text) \ No newline at end of file +print(requests.get("https://leostepanewk.com").text) \ No newline at end of file From 5256dad77b02e38693d9c49cb61e9efe77eab78a Mon Sep 17 00:00:00 2001 From: Leo Stepanewk <44349262+leo-step@users.noreply.github.com> Date: Fri, 29 Jul 2022 09:22:50 -0400 Subject: [PATCH 3/3] attempt 3 --- .github/workflows/run-python.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/run-python.yml b/.github/workflows/run-python.yml index 875b0c4b..02676bca 100644 --- a/.github/workflows/run-python.yml +++ b/.github/workflows/run-python.yml @@ -5,18 +5,13 @@ on: workflow_dispatch jobs: build: runs-on: ubuntu-latest - steps: - - name: checkout repo content - uses: actions/checkout@v3 # checkout the repository content to github runner. - - name: setup python - uses: actions/setup-python@v4ß + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: - python-version: '3.9' #install the python needed - - name: install dependencies - run: | + python-version: '3.9' + - run: | python -m pip install --upgrade pip pip install requests - - name: execute script # run file - run: | + - run: | python test.py \ No newline at end of file