From d70695d7767f30d86b5beeb93a725c2abdfd2696 Mon Sep 17 00:00:00 2001 From: moritzrfs Date: Sun, 4 May 2025 17:47:05 +0200 Subject: [PATCH] Add new workflow steps --- .gitea/workflows/test.yaml | 34 +++++++++++++++++++++++++--------- requirements.txt | 7 +++++++ 2 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 requirements.txt diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index ea764bd..7086d90 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -19,16 +19,32 @@ jobs: - run: echo "🍏 This job's status is ${{ job.status }}." - run: echo "Ok, let's go!" - Explore-Own-Steps: + Run-Python-Script: runs-on: ubuntu-latest steps: - - name: Show custom variable - run: echo "The URL is ${{ vars.ADGUARD_URL }}" - - - name: Check out repository + - name: Check out repository code uses: actions/checkout@v4 - - - name: Run Python script from file - run: python3 test.py + # load vars and secrets from Gitea + - name: Load config vars env: - ADGUARD_URL: ${{ vars.ADGUARD_URL }} \ No newline at end of file + ADGUARD_URL: ${{ vars.ADGUARD_URL }} + ADGUARD_USER: ${{ vars.ADGUARD_USER }} + ADGUARD_PASSWORD: ${{ secrets.ADGUARD_PASSWORD }} + YAML_FILE: ${{ vars.YAML_FILE }} + run: | + echo "Exporting config vars..." + echo "URL: $ADGUARD_URL" + echo "User: $ADGUARD_USER" + echo "YAML_FILE: $YAML_FILE" + + # install required Python packages from requirements.txt + - name: Install required Python packages + run: | + echo "Installing required Python packages..." + pip install -r requirements.txt + # run the Python script + # - name: Run the Python script + # run: | + # echo "Running the Python script..." + # python3 main.py + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..220ef9e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +certifi==2025.4.26 +charset-normalizer==3.4.2 +idna==3.10 +python-dotenv==1.1.0 +PyYAML==6.0.2 +requests==2.32.3 +urllib3==2.4.0