
This GitHub Action creates, changes or deletes DNS records of your Interweb domain through the API, from inside a workflow. Use it to point a name to a new server after a deploy, to add a verification TXT, or to keep the zone in a repository.
What it does
It handles A, AAAA, CNAME, MX, TXT, NS, SRV and CAA records, one at a time or several in one step, as a JSON list in records.
The default action is upsert: if the record already exists as asked, nothing changes. On A, AAAA and CNAME, a single record with the same name and type gets the new value. On MX, TXT, NS, SRV and CAA, a new value is added next to the others, so an SPF and a verification code can live together. To change one of several records, give its current value in match-value.
There is also create, which always adds unless the same record is already there, and delete, which deletes the records with that name and type. With dry-run it shows what would change, without changing it.
What you need
A domain that is active on your account, with DNS on, and an API key created in the API Center of Meu Interweb. The action only uses the Python 3 already on the runner.
Installing, step by step
|
|
|
|
name: DNS
on:
workflow_dispatch:
jobs:
dns:
runs-on: ubuntu-latest
steps:
- name: Point www to the new server
uses: interweb-ao/dns-update-action@v1
with:
api-key: ${{ secrets.INTERWEB_API_KEY }}
domain: example.co.ao
type: A
name: www
value: 203.0.113.10
ttl: 3600
The example with several records in one step, the full list of inputs and the releases are in the action repository. The latest release tells you what changed.
The API key and its permissions
The key needs dns:read and dns:write. It goes in the api-key input. Left empty, the action uses the INTERWEB_API_KEY environment variable. See how to create a key and pick its permissions.
Testing without spending
With a sandbox_ key the changes are simulated, which makes it a safe way to try your workflow. To see what would change without changing anything, use dry-run.
Good to know
Zone copy: a copy of the zone is kept before each change, and you can go back to it through the API. See DNS through the API.
What it leaves alone: read-only records, such as the NS records of the domain itself, are never touched. Nameservers are changed in the domain settings. The MX records of the domain of your account email cannot be changed through the API either: change them in Meu Interweb.
Limit: changes are limited to 20 per minute per account.
Outputs: changed (true when something changed, or would change in a dry run), record-ids and simulated.
Help
If the step fails with an error you do not understand, open a support ticket and copy the message from the workflow log. The DNS part of the API is described in DNS, in the API documentation. The code is in the action repository, under the MIT license.
|
Ready to handle DNS from your workflow? Download the latest release |
|
SEE ALSO |
RECOMMENDED PRODUCT Register your .ao domain Secure your company name before someone else registers it. from 30.000,00 Kz/yr Search a domain |











