Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
cloud

GitHub Action

DigitalOcean Kubernetes

v1.2.0

DigitalOcean Kubernetes

cloud

DigitalOcean Kubernetes

Use DigitalOcean Kubernetes in GitHub Actions

Installation

Copy and paste the following snippet into your .yml file.

              

- name: DigitalOcean Kubernetes

uses: matootie/dokube@v1.2.0

Learn more about this action in matootie/dokube

Choose a version

DigitalOcean Kubernetes GitHub Action

Fetches the latest kubeconfig for your DigitalOcean Kubernetes Cluster using DigitalOcean API v2, then configures kubectl and exposes to path for future use.

Inputs

personalAccessToken

Required A DigitalOcean Personal Access Token to use with doctl. Must be tied to the same account as the Kubernetes Cluster you are trying to operate on. For instructions, see here

clusterName

Required The name of the cluster you are trying to operate on. This was chosen during the "Choose a name" step when originally creating the cluster. Example cluster name field

expirationTime

Optional Amount of time, in seconds, that the generated DigitalOcean Token has to live. Defaults to 600.

Example usage

- name: Set up kubectl
  uses: matootie/dokube@v1.2.0
  with:
    personalAccessToken: ${{ secrets.DIGITALOCEAN_TOKEN }}
    clusterName: my-fabulous-cluster
    expirationTime: 300

- name: Get nodes
  run: kubectl get nodes