Skip to content

Commit

Permalink
feat(action): use setup python poetry action
Browse files Browse the repository at this point in the history
  • Loading branch information
felix11h committed Oct 25, 2023
1 parent f2713c1 commit a072717
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit a072717

Please sign in to comment.