From 6e73ebaa20c84de5aec2344ba129b4fa430eec1e Mon Sep 17 00:00:00 2001 From: Nejc Date: Mon, 10 Mar 2025 19:21:43 +0800 Subject: [PATCH 1/3] fix: added working_dir --- action.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index 2336699..f9e774b 100644 --- a/action.yml +++ b/action.yml @@ -74,6 +74,7 @@ branding: runs: using: "composite" + steps: - name: 📄 Get PR commit messages shell: bash @@ -90,25 +91,25 @@ runs: - name: 💿 Install uv uses: astral-sh/setup-uv@v5 + working-directory: ${{ github.action_path }} with: version: "0.6.2" enable-cache: true - cache-dependency-glob: "**/uv.lock" - - - run: echo ${{ github.action_path }} - shell: bash - name: 💿 Install python uses: actions/setup-python@v5 + working-directory: ${{ github.action_path }} with: - python-version-file: "${{ github.action_path }}/pyproject.toml" + python-version-file: "pyproject.toml" - name: 🦺 Install python packages shell: bash - run: uv sync --all-extras --dev --directory '${{ github.action_path }}' + working-directory: ${{ github.action_path }} + run: uv sync --all-extras --dev - name: 🤖 Run id: summary + working-directory: ${{ github.action_path }} run: | if [ -f commit_messages.txt ]; then export COMMITS=$(cat commit_messages.txt) @@ -118,7 +119,7 @@ runs: if [ ! -z "${{ inputs.file }}" ] && [ -f "${{ inputs.file }}" ]; then export DATA=$(cat "${{ inputs.file }}") fi - uv run ${{ github.action_path }}/src/main.py + uv run src/main.py shell: bash env: OPENAI_KEY: ${{ inputs.openAiKey }} From 928d09099f07cffc159ba59c361f2de4d52a8de1 Mon Sep 17 00:00:00 2001 From: Nejc Date: Mon, 10 Mar 2025 19:26:45 +0800 Subject: [PATCH 2/3] fix: working dir --- action.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index f9e774b..9d1b459 100644 --- a/action.yml +++ b/action.yml @@ -74,7 +74,6 @@ branding: runs: using: "composite" - steps: - name: 📄 Get PR commit messages shell: bash @@ -91,25 +90,26 @@ runs: - name: 💿 Install uv uses: astral-sh/setup-uv@v5 - working-directory: ${{ github.action_path }} 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 - working-directory: ${{ github.action_path }} with: - python-version-file: "pyproject.toml" + python-version-file: "${{ github.action_path }}/pyproject.toml" - name: 🦺 Install python packages shell: bash - working-directory: ${{ github.action_path }} - run: uv sync --all-extras --dev + run: uv sync --all-extras --dev --directory '${{ github.action_path }}' - name: 🤖 Run id: summary - working-directory: ${{ github.action_path }} run: | if [ -f commit_messages.txt ]; then export COMMITS=$(cat commit_messages.txt) @@ -119,7 +119,7 @@ runs: if [ ! -z "${{ inputs.file }}" ] && [ -f "${{ inputs.file }}" ]; then export DATA=$(cat "${{ inputs.file }}") fi - uv run src/main.py + uv run ${{ github.action_path }}/src/main.py shell: bash env: OPENAI_KEY: ${{ inputs.openAiKey }} From a5aa1fd25e568b52dbdbcb5c0a5dd8b6cc002e21 Mon Sep 17 00:00:00 2001 From: Nejc Date: Mon, 10 Mar 2025 19:27:08 +0800 Subject: [PATCH 3/3] fix: working dir --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 9d1b459..924f461 100644 --- a/action.yml +++ b/action.yml @@ -102,11 +102,11 @@ runs: - name: 💿 Install python uses: actions/setup-python@v5 with: - python-version-file: "${{ github.action_path }}/pyproject.toml" + python-version-file: "pyproject.toml" - name: 🦺 Install python packages shell: bash - run: uv sync --all-extras --dev --directory '${{ github.action_path }}' + run: uv sync --all-extras --dev - name: 🤖 Run id: summary @@ -119,7 +119,7 @@ runs: if [ ! -z "${{ inputs.file }}" ] && [ -f "${{ inputs.file }}" ]; then export DATA=$(cat "${{ inputs.file }}") fi - uv run ${{ github.action_path }}/src/main.py + uv run src/main.py shell: bash env: OPENAI_KEY: ${{ inputs.openAiKey }}