|
1 | 1 | ---
|
2 |
| -title: Using Devbox in CI/CD with Github Actions |
| 2 | +title: Using Devbox in CI/CD with GitHub Actions |
3 | 3 | ---
|
4 | 4 |
|
5 |
| -This guide explains how to use Devbox in CI/CD using Github Actions. The [devbox-install-action](https://github.com/marketplace/actions/devbox-installer) will install Devbox CLI and any packages + configuration defined in your `devbox.json` file. You can then run tasks or scripts within `devbox shell` to reproduce your environment. |
| 5 | +This guide explains how to use Devbox in CI/CD using GitHub Actions. The [devbox-install-action](https://github.com/marketplace/actions/devbox-installer) will install Devbox CLI and any packages + configuration defined in your `devbox.json` file. You can then run tasks or scripts within `devbox shell` to reproduce your environment. |
6 | 6 |
|
7 |
| -This Github Action also supports caching the packages and dependencies installed in your `devbox.json`, which can significantly improve CI build times. |
| 7 | +This GitHub Action also supports caching the packages and dependencies installed in your `devbox.json`, which can significantly improve CI build times. |
8 | 8 |
|
9 | 9 | ## Usage
|
10 | 10 |
|
11 |
| -`devbox-install-action` is available on the [Github Marketplace](https://github.com/marketplace/actions/devbox-installer) |
| 11 | +`devbox-install-action` is available on the [GitHub Marketplace](https://github.com/marketplace/actions/devbox-installer) |
12 | 12 |
|
13 | 13 | In your project's workflow YAML, add the following step:
|
14 | 14 |
|
15 | 15 | ```yaml
|
16 | 16 | - name: Install devbox
|
17 |
| - uses: jetpack-io/devbox-install-action@v0.2.0 |
| 17 | + uses: jetpack-io/devbox-install-action@v0.6.0 |
18 | 18 | ```
|
19 | 19 |
|
20 | 20 | ## Example Workflow
|
|
33 | 33 | - uses: actions/checkout@v3
|
34 | 34 |
|
35 | 35 | - name: Install devbox
|
36 |
| - uses: jetpack-io/devbox-install-action@v0.2.0 |
| 36 | + uses: jetpack-io/devbox-install-action@v0.6.0 |
37 | 37 |
|
38 | 38 | - name: Run arbitrary commands
|
39 | 39 | run: devbox run -- echo "done!"
|
|
42 | 42 | run: devbox run test
|
43 | 43 | ```
|
44 | 44 |
|
45 |
| -## Configuring the Github Action |
| 45 | +## Configuring the Action |
46 | 46 |
|
47 |
| -The `devbox-install-action` provides the following inputs: |
48 |
| - |
49 |
| -| Input Argument| Description| Default| |
50 |
| -| :- | :- | :- | |
51 |
| -|`project-path` | Path to the folder that contains a valid devbox.json | Root directory of your repo |
52 |
| -|`enable-cache` | Caches the entire Nix store (your packages) in Github based on your `devbox.json`.| |
53 |
| -|`devbox-version`| Pins a specific version of the Devbox CLI for your action. Only supports >0.2.2| latest| |
54 |
| - |
55 |
| -An example of this configuration is below: |
56 |
| - |
57 |
| -```yaml |
58 |
| -- name: Install devbox |
59 |
| - uses: jetpack-io/[email protected] |
60 |
| - with: |
61 |
| - project-path: 'path-to-folder' |
62 |
| - enable-cache: true |
63 |
| - devbox-version: '0.2.2' |
64 |
| -``` |
| 47 | +See the [GitHub Marketplace page](https://github.com/marketplace/actions/devbox-installer) for the latest configuration settings and an example. |
0 commit comments