-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: create script to update DNS records from hashes.txt (#3458)
Description --- Provides a script that can update DNS TXT records from `meta/hashes.txt` file using Cloudflare API Motivation and Context --- Part of the release process once auto updates are working How Has This Been Tested? --- Manually https://www.digwebinterface.com/?hostnames=updates.taripulse.com&type=TXT&ns=resolver&useresolver=1.1.1.1
- Loading branch information
Byron Hambly
authored
Oct 15, 2021
1 parent
8f8b876
commit 1d11ae4
Showing
8 changed files
with
3,370 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
TOKEN= | ||
ZONE_ID= | ||
DOMAIN=updates.taripulse.com | ||
FILE=../../meta/hashes.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/fermium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# DNS Update | ||
|
||
A script to update DNS records from the hashes file. | ||
|
||
## Setup your env | ||
|
||
``` | ||
cp .env.sample .env | ||
``` | ||
|
||
- Edit `.env` to include your cloudflare api TOKEN, your ZONE_ID, and the DOMAIN to update. | ||
- Use FILE to set the name of the file to provide records, if not provided then the default `../../meta/hashes.txt` will be used. | ||
|
||
## Install deps | ||
|
||
``` | ||
npm ci | ||
``` | ||
|
||
## Run | ||
|
||
``` | ||
npm run update | ||
``` | ||
|
||
Deletes existing TXT records on the domain, and creates new records from each line in FILE. | ||
|
||
## Release process (manual) | ||
|
||
- push tag | ||
- build binaries | ||
- replace hashes in file `meta/hashes.txt` | ||
- sign `meta/hashes.txt` with maintainer gpg key and replace sig at `meta/hashes.txt.sig` | ||
- `npm run update` in this folder to update the DNS records to match the txt file |
Oops, something went wrong.