Skip to content

FarmaCare/action-doctl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions for DigitalOcean

This action enables you to interact with DigitalOcean services via the doctl command-line client.

Usage

As an example, one common use case is retrieving the credentials for a Kubernetes cluster hosted on DigitalOcean for use in a deployment workflow:

    - name: Save DigitalOcean kubeconfig
      uses: digitalocean/action-doctl@v1
      env:
        DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
      with:
        args: kubernetes cluster kubeconfig show k8s-cluster-name > $GITHUB_WORKSPACE/.kubeconfig

See this repository for a full end-to-end example that also demonstrates building the Docker image, pushing it to Docker Hub, and using kubectl to deploy to the Kubernetes cluster on DigitalOcean.

Secrets

  • DIGITALOCEAN_ACCESS_TOKENRequired A DigitalOcean personal access token (more info).

Environment variables

We provide defaults for the following, these may also be overridden:

  • DIGITALOCEAN_OUTPUT_FORMAT- Optional doctl's output output format, defaults to json

By default, this action is configured to save output in JSON format to ${HOME}/${GITHUB_ACTION}.${DIGITALOCEAN_OUTPUT_FORMAT}for consumption by downstream actions.

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

Packages

No packages published

Languages

  • Shell 62.4%
  • Dockerfile 37.6%