Skip to content

Commit

Permalink
doc: fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbrig committed Feb 23, 2024
1 parent c2fcdcc commit 6b22466
Showing 1 changed file with 44 additions and 14 deletions.
58 changes: 44 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@

## Contents

- [No Clocks, LLC Domain Name System Records](#no-clocks-llc-domain-name-system-records)
- [Contents](#contents)
- [Overview](#overview)
- [DNSControl](#dnscontrol)
- [Installation](#installation)
- [Usage](#usage)
- [Docker](#docker)
- [GitHub Actions](#github-actions)
- [Configuration](#configuration)
- [creds.json](#credsjson)
- [dnsconfig.js](#dnsconfigjs)
- [DNS Records](#dns-records)

## Overview

No Clocks, LLC utilizes [Porkbun](https://porkbun.com/) as our DNS Provider and Registrar.
Expand All @@ -19,8 +32,6 @@ DNS zones plus software that processes the DSL and pushes the resulting zones to

It can send the same DNS records to multiple providers.

It even generates the most beautiful `BIND` zone files.

It runs anywhere Go runs (Linux, macOS, Windows).

The provider model is extensible, so more providers can be added.
Expand Down Expand Up @@ -63,7 +74,7 @@ dnscontrol push
docker run --rm -it -v "$(pwd):/dns" ghcr.io/stackexchange/dnscontrol preview
```

## GitHub Actions
### GitHub Actions

This repository is configured to run the `dnscontrol` commands using GitHub Actions.

Expand All @@ -72,30 +83,49 @@ The defined DNS records are deployed to the DNS Provider using the GitHub action
The GitHub Action is defined in the [`.github/workflows/dnscontrol.yml`](.github/workflows/dnscontrol.yml) file.

```yaml
name: Check
name: DNSControl

on:
push:
branches:
- main
workflow_dispatch:

on: pull_request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PORKBUN_API_KEY: ${{ secrets.PORKBUN_API_KEY }}
PORKBUN_API_SECRET: ${{ secrets.PORKBUN_API_SECRET }}

jobs:
check:
dnscontrol:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- name: DNSControl check
- name: Check
uses: koenrh/dnscontrol-action@v3
with:
args: check
config_file: 'dnscontrol.js'
creds_file: 'creds.example.json'

# Optionally, if your DNSConfig files are in a non-default location,
# you could specify the paths to the config and credentials file.
config_file: 'dns/dnsconfig.js'
- name: Push
uses: koenrh/dnscontrol-action@v3
with:
args: push
config_file: 'dnscontrol.js'
creds_file: 'creds.example.json'
```
## Configuration
The configuration for `dnscontrol` is stored in the following files:

- `creds.json`
- `creds.json` (not included in the repository)
- `dnsconfig.js`

plus an additional, but optional, TypeScript definition file:
Expand All @@ -113,8 +143,8 @@ See the [creds.example.json](creds.example.json) file for an example of the form
{
"porkbun": {
"TYPE": "PORKBUN",
"api_key": "<porkbun-api-key>",
"secret_key": "<porkbun-secret-key>"
"api_key": "$PORKBUN_API_KEY",
"secret_key": "$PORKBUN_API_SECRET"
}
}
```
Expand Down

0 comments on commit 6b22466

Please sign in to comment.