From a072717915d1dc22e54367283e5b8b14612cbfc6 Mon Sep 17 00:00:00 2001 From: Felix Hoffmann Date: Wed, 25 Oct 2023 12:52:41 +0100 Subject: [PATCH] feat(action): use setup python poetry action --- action.yml | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/action.yml b/action.yml index 914e14c..e0ad7e3 100644 --- a/action.yml +++ b/action.yml @@ -21,31 +21,11 @@ runs: using: "composite" steps: - - name: Determine Python version - id: detect-versions - shell: bash - working-directory: ${{ github.action_path }} - run: | - if [ -z "${{ inputs.python_version }}" ] ; then - PYTHON_VERSION="$(sed -n -e '/^\[metadata\]/,/^\[/p' poetry.lock | sed -n -e 's/^python-versions[[:space:]]*=[[:space:]]*//p' | tr -d \"'[:space:]'\'~^)" - else - PYTHON_VERSION="${{ inputs.python_version }}" - fi - - echo "python-version=$PYTHON_VERSION" >> $GITHUB_OUTPUT - - - - name: Setup Python - uses: actions/setup-python@v4 + - uses: moneymeets/action-setup-python-poetry@master with: - python-version: '${{ steps.detect-versions.outputs.python-version }}' - - # Build and install "merge-checks" project from pyproject.toml in current directory - - run: pip install . - shell: bash - working-directory: ${{ github.action_path }} + working_directory: ${{ github.action_path }} - - run: merge_checks_runner + - run: poetry run merge_checks_runner shell: bash env: GITHUB_TOKEN: ${{ inputs.github_token }}