Merge branch 'release/0.1.2'

This commit is contained in:
Rostislav Raykov 2019-09-18 10:29:38 +02:00
commit 07155ab53f
5 changed files with 30 additions and 15 deletions

View file

@ -22,21 +22,16 @@ jobs:
toolchain: nightly
command: build
arguments: --release
- name: Extract version
id: version
uses: actions/github-script@0.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
return context.payload.ref.split('/')[2];
- name: Get the version
run: echo ::set-env name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Archive
run: tar cfJ cloudflare-ddns-${{ steps.version.outputs.result }}.tar.xz target/cloudflare-ddns
run: tar cfJ cloudflare-ddns-${{ VERSION }}.tar.xz target/release/cloudflare-ddns
- name: Create release
uses: softprops/action-gh-release@v1
with:
body: |
cloudflare-ddns release ${{ steps.version.outputs.result }}
cloudflare-ddns release ${{ VERSION }}
files: |
cloudflare-ddns-${{ steps.version.outputs.result }}
cloudflare-ddns-${{ VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2
Cargo.lock generated
View file

@ -153,7 +153,7 @@ dependencies = [
[[package]]
name = "cloudflare-ddns"
version = "0.1.1"
version = "0.1.2"
dependencies = [
"exitcode 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -1,6 +1,6 @@
[package]
name = "cloudflare-ddns"
version = "0.1.1"
version = "0.1.2"
authors = ["Rostislav Raykov <z@zbrox.org>"]
edition = "2018"
description = "A simple CLI tool to use Cloudflare's free DDNS service"

View file

@ -1,7 +1,27 @@
# CloudFlare DDNS update tool
![](https://github.com/zbrox/cloudflare-ddns/workflows/Build/badge.svg)
This is a simple CLI you can use to continuously update an A DNS record for a domain using CloudFlare's free DDNS service.
# TODO
## Options
Write about usage and CloudFlare setup
```
-k, --key <auth-key> The auth key you need to generate in your Cloudflare profile
-c, --cache <cache> Cache file for previously reported IP address (if skipped the IP will be reported on every execution)
-d, --domain <domain> The domain for which you want to report the current IP address
-e, --email <email> Your Cloudflare login email
-z, --zone <zone> The zone in which your domain is (usually that is your base domain name)
```
## Cloudflare Setup
You need to do some preparatory work in Cloudflare. Firstly this assumes you're using Cloudflare already to manage the DNS records for your domain.
### Initial DNS setup
You need to add a type `A` DNS record for your domain. The `Name` field you should fill in with the name of the subdomain. If you don't want to use a subdomain just type `@` then the base domain will be used. Then change the `Proxy status` field to be not `Proxied` but `DNS only`. This will allow you to input `0.0.0.0` in the `IPv4 Address` field. Then click the save button. You might need to wait sometime before the DNS record propagates.
### API key
We need to authenticate ourselves in front of the Cloudflare API. To do so we need to an auth key to pass along as a password together with our login email. You can find the global API key in `My profile > API Tokens`.

View file

@ -19,7 +19,7 @@ struct Cli {
#[structopt(long = "key", short = "k")]
auth_key: String,
/// The zone in which your domain is (usually that is your domain without the subdomain)
/// The zone in which your domain is (usually that is your base domain name)
#[structopt(long = "zone", short = "z")]
zone: String,