From 4a02410632797e1a59b00739f27ae2a3c6230128 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 20 Jan 2021 18:16:15 -0500 Subject: [PATCH] fix: action still runs if setup-python is not called (#542) * fix: action works if setup-python is missed * fix: two steps * fix: combine again * fix: use pipx for action --- action.yml | 10 ++++++---- docs/faq.md | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 9d23e023..6429ff78 100644 --- a/action.yml +++ b/action.yml @@ -19,8 +19,10 @@ runs: # This needs powershell-core because github.action path is a Windows-style # path on Windows. Powershell-core understands both types of paths. - - run: python -m pip install ${{ github.action_path }} + - run: > + pipx run + --spec ${{ github.action_path }} + cibuildwheel + ${{ inputs.package-dir }} + --output-dir ${{ inputs.output-dir }} shell: pwsh - - - run: python -m cibuildwheel ${{ inputs.package-dir }} --output-dir ${{ inputs.output-dir }} - shell: bash diff --git a/docs/faq.md b/docs/faq.md index 07dc171e..ac7c0824 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -116,7 +116,7 @@ If you use GitHub Actions for builds, you can use cibuildwheel as an action: uses: joerick/cibuildwheel@v1.7.4 ``` -This is a composite step that just installs and runs cibuildwheel. You can set command-line options as `with:` parameters, and use `env:` as normal. +This is a composite step that just runs cibuildwheel using pipx. You can set command-line options as `with:` parameters, and use `env:` as normal. Then, your `dependabot.yml` file could look like this: