Skip to content

namespacelabs/nscloud-cluster-action

Repository files navigation

Create a Namespace Cloud cluster

This repository hosts a GitHub action that creates a Namespace Cloud cluster and exposes a preconfigured kubectl to access it.

Example

jobs:
  deploy:
    name: Ephemeral cluster
    runs-on: ubuntu-latest
    # These permissions are needed to interact with GitHub's OIDC Token endpoint.
    permissions:
      id-token: write
      contents: read
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Configure access to Namespace
        uses: namespacelabs/nscloud-setup@v0
      - name: Create a Namespace Cloud cluster
        uses: namespacelabs/nscloud-cluster-action@v0
      - name: Apply configurations
        run: |
          kubectl apply -f foo/bar.yaml

Requirements

This action uses nsc, the Namespace Cloud CLI. You can add it to your workflow using namespacelabs/nscloud-setup (see example).