From f83b77c0e48385351e5350be31488d5c0e4bf216 Mon Sep 17 00:00:00 2001 From: Nejc Date: Mon, 10 Mar 2025 19:47:27 +0800 Subject: [PATCH] revert: back to pip --- action.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/action.yml b/action.yml index 924f461..913ee65 100644 --- a/action.yml +++ b/action.yml @@ -88,25 +88,21 @@ runs: fi git log origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }} --pretty=format:"%s" > commit_messages.txt - - name: 💿 Install uv - uses: astral-sh/setup-uv@v5 - with: - version: "0.6.2" - enable-cache: true - cache-dependency-glob: "**/uv.lock" - - - name: 📁 Working directory - run: cd ${{github.action_path}} - shell: bash - - name: 💿 Install python uses: actions/setup-python@v5 with: - python-version-file: "pyproject.toml" + python-version-file: "${{ github.action_path }}/pyproject.toml" - name: 🦺 Install python packages shell: bash - run: uv sync --all-extras --dev + run: | + python -m pip install --upgrade pip + if [ -f "${{ github.action_path }}/pyproject.toml" ]; then + pip install ${{ github.action_path }} + else + echo "pyproject.toml not found, installing dependencies directly" + pip install 'requests==2.32.3' 'anthropic==0.40.0' 'openai==1.55.3' 'nltk==3.9.1' 'markdown-it-py==3.0.0' 'google-genai==1.2.0' + fi - name: 🤖 Run id: summary @@ -119,7 +115,7 @@ runs: if [ ! -z "${{ inputs.file }}" ] && [ -f "${{ inputs.file }}" ]; then export DATA=$(cat "${{ inputs.file }}") fi - uv run src/main.py + python ${{ github.action_path }}/src/main.py shell: bash env: OPENAI_KEY: ${{ inputs.openAiKey }}