diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f449aed..d400819 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,7 +76,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create pull request - uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e + uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c if: failure() && github.ref_name == 'main' with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d17a59f..2dee90a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: TAG_NAME: v${{ steps.version-metadata.outputs.newVersion }} - name: Create release if: steps.version-metadata.outputs.changed == 'true' - uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 + uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 with: generate_release_notes: true tag_name: v${{ steps.version-metadata.outputs.newVersion }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 77bb8d1..bcc8c13 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -456,6 +456,27 @@ jobs: - run: | python --version | Select-String "3.11" shell: pixi run pwsh -Command {0} + + pixi-shell-exec: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: ./ + with: + run-install: false + - run: | + python --version | grep -q "3.11" + shell: pixi exec --spec python=3.11.* -- bash -e {0} + - run: | + import ruamel.yaml + shell: pixi exec --spec python --spec ruamel.yaml -- python {0} + - run: | + python --version | Select-String "3.11" + shell: pixi exec --spec python=3.11.* -- pwsh -Command {0} + post-cleanup-linux: runs-on: ubuntu-latest strategy: diff --git a/.prettierignore b/.prettierignore index 181f42c..dee70d2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,2 @@ dist -pnpm-lock.yaml \ No newline at end of file +pnpm-lock.yaml diff --git a/README.md b/README.md index c5551f4..e5da61d 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m ```yml - uses: prefix-dev/setup-pixi@v0.8.1 with: - pixi-version: v0.24.1 + pixi-version: v0.28.1 cache: true auth-host: prefix.dev auth-token: ${{ secrets.PREFIX_DEV_TOKEN }} @@ -229,6 +229,25 @@ If you want to use PowerShell, you need to specify `-Command` as well. > There are some custom shells provided by GitHub that have slightly different behavior, see [`jobs..steps[*].shell`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell) in the documentation. > See the [official documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#custom-shell) and [ADR 0277](https://github.com/actions/runner/blob/main/docs/adrs/0277-run-action-shell-options.md) for more information about how the `shell:` input works in GitHub Actions. +#### One-off shell wrapper using `pixi exec` + +With `pixi exec`, you can also run a one-off command inside a temporary pixi environment. + +```yml +- run: | # everything here will be run inside of the temporary pixi environment + zstd --version + shell: pixi exec --spec zstd -- bash -e {0} +``` + +```yml +- run: | # everything here will be run inside of the temporary pixi environment + import ruamel.yaml + # ... + shell: pixi exec --spec python=3.11.* --spec ruamel.yaml -- python {0} +``` + +See [here](https://pixi.sh/latest/reference/cli#exec) for more information about `pixi exec`. + ### Environment activation Instead of using a custom shell wrapper, you can also make all pixi-installed binaries available to subsequent steps by "activating" the installed environment in the currently running job. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1e08187..72d0d59 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -280,10 +280,6 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.10.0': - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint-community/regexpp@4.11.0': resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} @@ -637,15 +633,6 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} - debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@4.3.6: resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} engines: {node: '>=6.0'} @@ -1532,14 +1519,12 @@ snapshots: eslint: 9.9.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.10.0': {} - '@eslint-community/regexpp@4.11.0': {} '@eslint/config-array@0.18.0': dependencies: '@eslint/object-schema': 2.1.4 - debug: 4.3.4 + debug: 4.3.6 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -1547,7 +1532,7 @@ snapshots: '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.6 espree: 10.1.0 globals: 14.0.0 ignore: 5.3.1 @@ -1691,7 +1676,7 @@ snapshots: '@typescript-eslint/eslint-plugin@8.3.0(@typescript-eslint/parser@8.3.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4)': dependencies: - '@eslint-community/regexpp': 4.10.0 + '@eslint-community/regexpp': 4.11.0 '@typescript-eslint/parser': 8.3.0(eslint@9.9.1)(typescript@5.5.4) '@typescript-eslint/scope-manager': 8.3.0 '@typescript-eslint/type-utils': 8.3.0(eslint@9.9.1)(typescript@5.5.4) @@ -1713,7 +1698,7 @@ snapshots: '@typescript-eslint/types': 8.3.0 '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.3.0 - debug: 4.3.4 + debug: 4.3.6 eslint: 9.9.1 optionalDependencies: typescript: 5.5.4 @@ -1729,7 +1714,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) '@typescript-eslint/utils': 8.3.0(eslint@9.9.1)(typescript@5.5.4) - debug: 4.3.4 + debug: 4.3.6 ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: typescript: 5.5.4 @@ -1743,7 +1728,7 @@ snapshots: dependencies: '@typescript-eslint/types': 8.3.0 '@typescript-eslint/visitor-keys': 8.3.0 - debug: 4.3.4 + debug: 4.3.6 fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.4 @@ -1875,10 +1860,6 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - debug@4.3.4: - dependencies: - ms: 2.1.2 - debug@4.3.6: dependencies: ms: 2.1.2 @@ -1948,7 +1929,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.6 escape-string-regexp: 4.0.0 eslint-scope: 8.0.2 eslint-visitor-keys: 4.0.0