This action deploys a Nebari platform from a config file using the nic CLI, and destroys it automatically when the job ends, even on failure or cancellation.
Specifically, the action:
- Acquires
nicfrom a prebuilt binary (nic-binary) or from a release or Git ref (nic-version), verifying release downloads against their checksums and build provenance attestations (release tags must be v0.10.0 or newer because earlier releases have no attestation and are thus refused). - Runs
nic deploywith your config (or a built-in local kind default). - Exports
KUBECONFIGso every later step in the job runs against the deployed cluster. - Waits for the deployment to converge: nebari-root Synced, every Argo CD Application Healthy, and that state stable across consecutive polls.
- Destroys the deployment in a post step when the job ends, even when the job failed or was cancelled.
Deploy the built-in default config (a local kind cluster with an auto-created local gitops repository) using the latest nic release:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: nebari-dev/deploy-nebari-action@main
with:
nic-version: latest
# KUBECONFIG is exported so kubectl commands run against the deployed cluster.
- run: kubectl get pods -A| name | description | required | default |
|---|---|---|---|
config |
Path to the NIC config file, relative to the workspace. When unset, the action deploys its built-in default: a local kind cluster with an auto-created local gitops repository (see default-config.yaml in the action repository). Copy it into your repository as a starting point for a custom config. |
false |
"" |
nic-binary |
Path to a local prebuilt nic binary. Set exactly one of nic-binary and nic-version. |
false |
"" |
nic-version |
NIC version to acquire. Mutually exclusive with nic-binary.
|
false |
"" |
wait |
Wait for the deployment to converge after deploy (nebari-root Synced, all Argo CD Applications Healthy, stable across consecutive polls). |
false |
true |
wait-timeout |
Seconds to wait for Applications to converge. |
false |
1200 |
restart-budgets |
Comma-separated namespace=count pairs overriding the per-namespace container restart budgets the wait uses to fail fast on crashloops (e.g. 'keycloak=12,cnpg-system=8'). Use |
false |
"" |
destroy |
Destroy the deployment in the post step when the job ends. |
false |
true |
force |
Pass --force to nic destroy so teardown continues past individual resource failures. |
false |
true |
token |
GitHub token used to resolve and download NIC releases (nic-version mode). |
false |
${{ github.token }} |
| name | description |
|---|---|
kubeconfig |
Path to a kubeconfig for the deployed cluster (also exported as KUBECONFIG). |
nic-binary |
Path to the nic binary used, for running further nic commands in later steps. |
Copy default-config.yaml into your repository as a starting point, edit it, and pass it via the config input.
Note that nic requires the config to declare exactly one repository: provider. The default config uses the local provider, which auto-creates a gitops repository on the runner. To have nic push to a remote repository instead, use the existing provider and supply credentials through an environment variable. See the NIC configuration examples.
repository:
existing:
url: 'git@github.com:my-org/my-gitops-repo.git'
branch: main
path: 'clusters/my-nebari'
auth:
ssh:
env: GIT_SSH_PRIVATE_KEY
# or, for HTTPS:
# token:
# env: GIT_TOKEN- uses: nebari-dev/deploy-nebari-action@main
with:
config: ci/nebari-config.yaml
nic-version: latest
wait-timeout: '1800'When a previous job already built nic (for example from the PR under test), pass the binary directly instead of a version:
- uses: actions/download-artifact@v6
with:
name: nic
- run: chmod +x nic
- uses: nebari-dev/deploy-nebari-action@main
with:
config: ci/nebari-config.yaml
nic-binary: nicAny nic-version that is not latest or a release tag is treated as a Git ref of nebari-infrastructure-core and built from source, which requires Go:
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- uses: nebari-dev/deploy-nebari-action@main
with:
nic-version: mainSet destroy: false to leave the deployment running when the job ends, for example to debug a failing environment:
- uses: nebari-dev/deploy-nebari-action@main
with:
nic-version: latest
destroy: falseCloud deployments left running must be destroyed manually with nic destroy.