Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GITHUB_ACTION_PATH envvar #81

Merged
merged 3 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,20 @@ outputs:
runs:
using: composite
steps:
- run: ${{ github.action_path }}/bin/ensure_python
- run: $GITHUB_ACTION_PATH/bin/ensure_python
shell: bash
- run: >
${{ github.action_path }}/bin/install_packages
$GITHUB_ACTION_PATH/bin/install_packages
${{ inputs.isort-version || inputs.isortVersion }}
${{ inputs.requirements-files || inputs.requirementsFiles }}
shell: bash
- run: echo "::add-matcher::${{ github.action_path }}/isort-matcher.json"
- run: echo "::add-matcher::$GITHUB_ACTION_PATH/isort-matcher.json"
shell: bash
- id: run-isort
run:
${{ github.action_path }}/bin/run_isort ${{ inputs.configuration }} ${{ inputs.sort-paths || inputs.sortPaths }}
run: >
$GITHUB_ACTION_PATH/bin/run_isort
${{ inputs.configuration }}
${{ inputs.sort-paths || inputs.sortPaths }}
shell: bash
- run: echo "::remove-matcher owner=isort-matcher::"
shell: bash
6 changes: 3 additions & 3 deletions bin/install_packages
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ requirements_files=$2
echo "::group::Install isort"
if [ -z "$isort_version" ] || [ "$isort_version" == "latest" ]; then
echo "Installing latest version of isort"
pip3 install "isort[requirements_deprecated_finder,pipfile_deprecated_finder]"
python3 -m pip install "isort[requirements_deprecated_finder,pipfile_deprecated_finder]"
else
echo "Installing isort==$isort_version"
pip3 install "isort[requirements_deprecated_finder,pipfile_deprecated_finder]==$isort_version"
python3 -m pip install "isort[requirements_deprecated_finder,pipfile_deprecated_finder]==$isort_version"
fi
echo "::endgroup::"

if [ -n "$requirements_files" ]; then
echo "::group::Install modules from requirements arg"
for file in $requirements_files; do
pip install -r "$file"
python3 -m pip install -r "$file"
done
echo "::endgroup::"
fi