From bf85ad477a3b920a8cd7d4b7f5ecef1ee84d0944 Mon Sep 17 00:00:00 2001 From: Peter Shen Date: Sun, 19 Nov 2023 21:38:31 +0800 Subject: [PATCH 1/2] Update action.yml --- action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) 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: From 7fafa26c3323fdde83e47b805a25e8160b10bd8c Mon Sep 17 00:00:00 2001 From: Peter Shen Date: Sun, 19 Nov 2023 21:40:11 +0800 Subject: [PATCH 2/2] Update entrypoint.sh --- entrypoint.sh | 9 --------- 1 file changed, 9 deletions(-) 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