An action for the Nimbus service that deploys projects to your self-hosted servers.
Here's an example of how to use this action in a workflow file:
If your services use pre-built images, a single job handles both deploy and cleanup:
name: Nimbus Deploy
on:
push:
delete:
jobs:
nimbus:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rayman-tech/nimbus-action@v2
with:
api-key: ${{ secrets.NIMBUS_API_KEY }}
nimbus-server: ${{ secrets.NIMBUS_URL }}
nimbus-path: nimbus.yamlIf your workflow builds a Docker image before deploying, split into two jobs so the delete event skips the build:
name: Build and Deploy
on:
push:
delete:
jobs:
build-and-deploy:
if: github.event_name != 'delete'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: registry.example.com
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v5
with:
context: .
push: true
tags: registry.example.com/my-app:${{ github.sha }}
- uses: rayman-tech/nimbus-action@v2
with:
api-key: ${{ secrets.NIMBUS_API_KEY }}
nimbus-server: ${{ secrets.NIMBUS_URL }}
nimbus-path: nimbus.yaml
cleanup:
if: github.event_name == 'delete'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rayman-tech/nimbus-action@v2
with:
api-key: ${{ secrets.NIMBUS_API_KEY }}
nimbus-server: ${{ secrets.NIMBUS_URL }}
nimbus-path: nimbus.yamlAdding the delete event enables automatic cleanup of branch preview deployments when branches are deleted (e.g., after merging a PR). Tag deletions are ignored.
Public http services can specify custom nginx ingress annotations via an
annotations map in your nimbus.yaml. These are merged on top of Nimbus'
defaults, so you can both append new annotations and override the built-ins
(e.g. to wire up external auth):
services:
- name: web
template: http
public: true
image: registry.example.com/web:latest
network:
ports: [8080]
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/auth-url: "https://idp.example.com/sessions/whoami"
nginx.ingress.kubernetes.io/auth-signin: "https://proxy.example.com/oauth2/start?rd=$scheme://$host$request_uri"See the sample nimbus.yaml for a full example.
| Environment | Default | Description |
|---|---|---|
nimbus-server |
N/A | The URL of the Nimbus server |
api-key |
N/A | The API key for the Nimbus project |
nimbus-path |
nimbus.yaml |
The path to the nimbus file in your repository |
| Input | Description |
|---|---|
service-urls |
List of URLs created from the nimbus file |