No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Bala Nallamilli 3cb3953159
Merge pull request #137 from digitalocean/bn/node24-and-checkout-v5
Update action runtime to Node 24 and refresh CI to actions/checkout@v5
2026-04-22 14:15:51 +05:30
.github/workflows Apply suggestion from @Copilot 2026-04-21 23:08:36 +05:30
dist changes 2026-03-13 13:40:52 +05:30
.gitignore Initial work on v2. 2020-03-26 20:47:56 -04:00
action.yml Update action runtime to Node 24 2026-04-21 22:41:58 +05:30
eslint.config.mjs Add eslint.config.mjs 2024-11-18 11:11:00 -05:00
LICENSE Initial commit. 2019-01-25 17:25:54 -05:00
main.js changes 2026-03-13 13:36:58 +05:30
package-lock.json Bump @octokit/request from 9.1.3 to 9.2.2 2025-02-18 19:25:39 +00:00
package.json Bump cross-spawn, @octokit/rest and eslint 2024-11-17 15:22:03 +00:00
README.md README: Add doctl version dependency note 2023-10-25 12:54:57 -06:00

GitHub Actions for DigitalOcean

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

Usage

To install the latest version of doctl and use it in GitHub Actions workflows, create a DigitalOcean API token, add it as a secret to your repository, and add the following step to your workflow:

    - name: Install doctl
      uses: digitalocean/action-doctl@v2
      with:
        token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

doctl will now be available in the virtual environment and can be used directly in following steps. 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
      run: doctl kubernetes cluster kubeconfig save testing-cluster

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

Arguments

  • token (Required) A DigitalOcean personal access token (more info).
  • version (Optional) The version of doctl to install. If excluded, the latest release will be used.
  • no_auth (Optional) Set to true to skip the authentication step. The API token parameter is Optional in this case.
    • Note: This can be useful when running in workflows in untrusted environments, or where auth isn't necessary (e.g. doctl app spec validate --schema-only)
    • This depends on doctl >= v1.101.0 (digitalocean/doctl#1450)

Contributing

To install the needed dependencies, run npm install. The resulting node_modules/ directory is not checked in to Git.

Before submitting a pull request, run npm run package to package the code using ncc. Packaging assembles the code including dependencies into one file in the dist/ directory that is checked in to Git.

Pull requests should be made against the v2 branch.

License

This GitHub Action and associated scripts and documentation in this project are released under the MIT License.