You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+19
Original file line number
Diff line number
Diff line change
@@ -229,6 +229,25 @@ If you want to use PowerShell, you need to specify `-Command` as well.
229
229
> There are some custom shells provided by GitHub that have slightly different behavior, see [`jobs.<job_id>.steps[*].shell`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell) in the documentation.
230
230
> 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.
231
231
232
+
#### One-off shell wrapper using `pixi exec`
233
+
234
+
With `pixi exec`, you can also run a one-off command inside a temporary pixi environment.
235
+
236
+
```yml
237
+
- run: | # everything here will be run inside of the temporary pixi environment
238
+
zstd --version
239
+
shell: pixi exec --spec zstd -- bash -e {0}
240
+
```
241
+
242
+
```yml
243
+
- run: | # everything here will be run inside of the temporary pixi environment
See [here](https://pixi.sh/latest/reference/cli#exec) for more information about `pixi exec`.
250
+
232
251
### Environment activation
233
252
234
253
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.
0 commit comments