This action downloads the devbox CLI and installs the Nix packages defined in your devbox.json.
name: Testing with devbox
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.12.0
- name: Run arbitrary commands
run: devbox run -- echo "done!"
- name: Run a script called test
run: devbox run test
Here's an example job with most inputs:
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.12.0
with:
project-path: 'path-to-folder'
enable-cache: 'true'
refresh-cli: 'false'
devbox-version: 0.13.4
disable-nix-access-token: 'false'
sha256-checksum: <checksum>
On a privately hosted GitHub Enterprise Server, the github.token available in the context is not valid for accessing api.github.com,
which can lead to failures due to the rate-limit for unauthenticated requests. To work around this, you can provide a personal access token
for api.github.com in the extra-nix-config input.
Additionally, it might be necessary to provide a token for your GitHub Enterprise Server, if you are using Nix packages from there.
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.12.0
with:
extra-nix-config: access-tokens = my-github-enterprise-server.example.com=${{ github.token }} github.com=${{ secrets.MY_GITHUB_COM_TOKEN }}
