Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Is there a way to get/add/modify DNS records in Digital Ocean via doctl or another command line utility? I was unable to find anything that looked relevant via doctl help.
It looks like worst case I could call the HTTP API directly, although I’m not sure how I would need to get the correct authentication credentials.
curl 'https://cloud.digitalocean.com/api/v1/domains/MY_DOMAIN/records/MY_RECORD' -X PUT
...
-H 'Cookie: ... _digitalocean2_session_v4=SOME_AUTH_TOKEN?; ...'
--data-raw '{"record":{"name":"_dnslink.www.MY_DOMAIN","record_type":"TXT","created_at":"2020-08-30T22:39:51.000Z","updated_at":"2020-09-24T03:55:21.000Z","port":null,"weight":null,"ttl":"300","data_record":"dnslink=/ipfs/IPFS_HASH","priority":null,"tag":null,"flags":null,"droplet_id":null,"floating_ip_id":null,"load_balancer_id":null}}'
My use case is I have a GitHub Action that uploads a web app to IPFS (https://ipfs.io/) that is served via a _dnslink.DOMAIN TXT record via CloudFlare (https://medium.com/pinata/how-to-easily-host-a-website-on-ipfs-9d842b5d6a01, section Setting Up Your DNS Records to Point to Cloudflare). After the upload happens, I need to update that _dnslink record to point to the new IPFS hash (_dnslink.DOMAIN TXT “dnslink=/ipfs/IPFS_HASH”)
Action yml (modified for clarity) in case it helps:
name: web
on:
push
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install npm dependencies
run: npm install
- name: Typescript checks
run: npm run tsc
- name: Webpack build
run: npm run build
- name: Upload to Pinata (IPFS)
uses: aquiladev/ipfs-action@v0.1.4
with:
path: ./dist
service: pinata
pinataKey: ${{ secrets.PINATA_KEY }}
pinataSecret: ${{ secrets.PINATA_SECRET }}
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITAL_OCEAN_DOCKER_AUTH }}
- name: Update dnslink record
# HELP What should I do here?
run: doctl ...
9c1989c1c80144c7a9977905ce64c9
Scott H
1e6b823ea20d4cb189a34a922f5588
Rory McEwan
lan
kprichard
realmag777
Edward Narrdo
Vinoth K