From 93ea1bbe650b5c2a5ddfaf32f4cf22bba1556a30 Mon Sep 17 00:00:00 2001 From: MeghdadFadaee Date: Sat, 16 Nov 2024 20:36:38 +0330 Subject: [PATCH] initial commit --- . github/workflows/check.yml | 29 +++++++++++++++++++++++++++++ main.py | 9 +++++++++ requirements.txt | 1 + 3 files changed, 39 insertions(+) create mode 100644 . github/workflows/check.yml create mode 100644 main.py create mode 100644 requirements.txt diff --git a/. github/workflows/check.yml b/. github/workflows/check.yml new file mode 100644 index 0000000..b542d4f --- /dev/null +++ b/. github/workflows/check.yml @@ -0,0 +1,29 @@ +name: Run Python Script Every Hour + +on: + schedule: + - cron: "0 * * * *" + +jobs: + run-script: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run Python Script + env: + EITAAEAR_TOKEN: ${{ secrets.EITAAEAR_TOKEN }} + run: | + python main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..aae6588 --- /dev/null +++ b/main.py @@ -0,0 +1,9 @@ +import os + +token = os.getenv("EITAAEAR_TOKEN") + +if token: + print("Token received successfully!") + print("token is:", token) +else: + print("Token not found.") diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..663bd1f --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +requests \ No newline at end of file