Added support for specifying a working directory.

This commit is contained in:
Mark Dorison 2020-10-21 20:53:08 -04:00 committed by Koen Rouwhorst
parent 0a44e23acd
commit a9cc98e29e
3 changed files with 9 additions and 0 deletions

View file

@ -30,6 +30,7 @@ jobs:
uses: koenrh/dnscontrol-action@v3
with:
args: check
working_dir: '.' # optional path to dnsconfig.js.
```
### preview
@ -55,6 +56,7 @@ jobs:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
with:
args: preview
working_dir: '.' # optional path to dnsconfig.js.
```
This is the action you probably want to run for each branch so that proposed changes
@ -128,6 +130,7 @@ jobs:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
with:
args: push
working_dir: '.' # optional path to dnsconfig.js.
```
## Credentials

View file

@ -9,6 +9,10 @@ inputs:
args:
description: DNSControl command
required: true
working_dir:
description: Working directory location of dnsconfig.js
required: false
default: '.'
outputs:
output:
description: The output of the dnscontrol command that was executed.

View file

@ -2,6 +2,8 @@
set -eo pipefail
cd "$INPUT_WORKING_DIR"
IFS=
OUTPUT="$(dnscontrol "$1")"