diff --git a/README.md b/README.md index b572859..fb7942e 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/action.yml b/action.yml index e876cf2..2fd7c3f 100644 --- a/action.yml +++ b/action.yml @@ -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. diff --git a/entrypoint.sh b/entrypoint.sh index 0a39333..4c55c06 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,6 +2,8 @@ set -eo pipefail +cd "$INPUT_WORKING_DIR" + IFS= OUTPUT="$(dnscontrol "$1")"