diff --git a/.gitea/workflows/action.yml b/.gitea/workflows/action.yml index d924588..1ce1cbc 100644 --- a/.gitea/workflows/action.yml +++ b/.gitea/workflows/action.yml @@ -17,14 +17,22 @@ jobs: - name: Checkout Repository uses: actions/checkout@v3 - - name: Install python requirements + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install Python dependencies in virtualenv run: | - python3 -m pip install --upgrade pip + python3 -m venv venv + source venv/bin/activate + python -m pip install --upgrade pip pip install -r adguard-dns-tools/requirements.txt - - name: Deploy DNS entries to AdGuard Home + - name: Deploy DNS entries to AdGuard Home run: | - python3 adguard-dns-tools/main.py --sync + source venv/bin/activate + python adguard-dns-tools/main.py --sync working-directory: ${{ github.workspace }} shell: bash env: @@ -32,12 +40,10 @@ jobs: ADGUARD_PASSWORD: ${{ env.ADGUARD_PASSWORD }} ADGUARD_URL: ${{ env.ADGUARD_URL }} JSON_FILE: ${{ env.JSON_FILE }} - # write output and tell that it ran successfully continue-on-error: false timeout-minutes: 10 id: deploy_dns + - name: Deployment Result - run: | - echo "DNS entries deployed successfully to AdGuard Home." if: success() - shell: bash \ No newline at end of file + run: echo "✅ DNS entries deployed successfully to AdGuard Home." \ No newline at end of file