mirror of
https://github.com/koenrh/dnscontrol-action.git
synced 2025-01-04 06:12:44 +08:00
Added support for specifying a working directory.
This commit is contained in:
parent
0a44e23acd
commit
a9cc98e29e
3 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
set -eo pipefail
|
||||
|
||||
cd "$INPUT_WORKING_DIR"
|
||||
|
||||
IFS=
|
||||
OUTPUT="$(dnscontrol "$1")"
|
||||
|
||||
|
|
Loading…
Reference in a new issue