Skip to content

Install Python packages using pipx with cache support on GitHub Actions

License

Notifications You must be signed in to change notification settings

threeal/pipx-install-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Pipx Install Action

Install Python packages using pipx with cache support on GitHub Actions.

Use this action to install Python packages using pipx, especially for tools written in Python that should be installed in isolated environments. After installation, this action will automatically save the installed packages to a cache to speed up installations for subsequent workflow runs.

Key Features

  • Installs Python packages using pipx.
  • Caches Python package installations to be used in subsequent workflow runs.

Available Inputs

Name Type Description
packages Multiple strings (required) Names of the Python packages to be installed.

Example Usages

This example demonstrates how to use the Pipx Install Action to install Ruff in a GitHub Actions workflow:

name: Python CI
on:
  push:
jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/[email protected]

      - name: Install Ruff
        uses: threeal/[email protected]
        with:
          packages: ruff

      # Add more steps as needed for the workflow

License

This project is licensed under the terms of the MIT License.

Copyright © 2024 Alfi Maulana