From a00832b3a9a0df00c17a32258ecbb064db17e846 Mon Sep 17 00:00:00 2001 From: Peter Shen Date: Sun, 19 Nov 2023 08:43:35 -0500 Subject: [PATCH 1/2] fix: update action.yml and entrypoint.sh to fix #23 (#25) --- action.yml | 9 +++++++++ entrypoint.sh | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/action.yml b/action.yml index aa58901..cf0b61f 100644 --- a/action.yml +++ b/action.yml @@ -32,6 +32,15 @@ inputs: runs: using: "composite" steps: + - name: Install action dependencies + shell: bash + run: | + if [[ "$RUNNER_OS" == "Linux" ]]; then + # https://github.com/pypa/setuptools/issues/3269 + export DEB_PYTHON_INSTALL_LAYOUT=deb + fi + python3 -m pip install -r "$GITHUB_ACTION_PATH/requirements.txt" + - name: Run commit-check - run: ${{ github.action_path }}/entrypoint.sh shell: bash env: diff --git a/entrypoint.sh b/entrypoint.sh index 3e365c7..5389097 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,14 +3,6 @@ set -euo pipefail ret_code=0 -install_dependencies(){ - if [[ "$RUNNER_OS" == "Linux" ]]; then - # https://github.com/pypa/setuptools/issues/3269 - export DEB_PYTHON_INSTALL_LAYOUT=deb - fi - python3 -m pip install -r requirements.txt -} - run_commit_check(){ args="" if [[ "$MESSAGE" == "true" ]]; then @@ -48,7 +40,6 @@ add_job_summary(){ fi } -install_dependencies run_commit_check add_job_summary From c67a8441e491fb7500ccae8be352ec5d6680c47a Mon Sep 17 00:00:00 2001 From: Peter Shen Date: Sun, 19 Nov 2023 21:48:16 +0800 Subject: [PATCH 2/2] fix: Update action.yml --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index cf0b61f..4edf280 100644 --- a/action.yml +++ b/action.yml @@ -41,8 +41,8 @@ runs: fi python3 -m pip install -r "$GITHUB_ACTION_PATH/requirements.txt" - name: Run commit-check - - run: ${{ github.action_path }}/entrypoint.sh shell: bash + run: ${{ github.action_path }}/entrypoint.sh env: MESSAGE: ${{ inputs.message }} BRANCH: ${{ inputs.branch }}