diff --git a/action.yml b/action.yml index aa58901..4edf280 100644 --- a/action.yml +++ b/action.yml @@ -32,8 +32,17 @@ inputs: runs: using: "composite" steps: - - run: ${{ github.action_path }}/entrypoint.sh + - 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 + shell: bash + run: ${{ github.action_path }}/entrypoint.sh env: MESSAGE: ${{ inputs.message }} BRANCH: ${{ inputs.branch }} 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