From 3669ec92f8a76cd91637bb76ccd9919902ff8ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Kleinekath=C3=B6fer?= Date: Sun, 5 Feb 2023 16:26:10 +0100 Subject: [PATCH 1/9] Update action.yml --- action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/action.yml b/action.yml index b4ba3f8..0f04272 100644 --- a/action.yml +++ b/action.yml @@ -3,6 +3,10 @@ name: 'octodns-sync' description: 'Run octodns/octodns to deploy your DNS config to any cloud.' inputs: + force: + description: 'Run octodns in force mode?' + required: true + default: 'No' add_pr_comment: description: 'Add plan as a comment, when triggered by a pull request?' required: true From 9833aa80b95958cdaca9f9726b073b7f35fc00ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Kleinekath=C3=B6fer?= Date: Sun, 5 Feb 2023 16:27:31 +0100 Subject: [PATCH 2/9] Update run.sh --- scripts/run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/run.sh b/scripts/run.sh index ea91fbe..9045a19 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -9,6 +9,7 @@ _config_path=$CONFIG_PATH _doit=$DOIT +_force=$FORCE # Run octodns-sync. _logfile="${GITHUB_WORKSPACE}/octodns-sync.log" @@ -22,8 +23,11 @@ echo "INFO: _config_path: ${_config_path}" if [ ! "${_doit}" = "--doit" ]; then _doit= fi +if [ ! "${_force}" = "Yes" ]; then + _force= +fi -if ! octodns-sync --config-file="${_config_path}" ${_doit} \ +if ! octodns-sync --config-file="${_config_path}" ${_doit} ${_force} \ 1>"${_planfile}" 2>"${_logfile}"; then echo "FAIL: octodns-sync exited with an error." echo "FAIL: Here are the contents of ${_logfile}:" From c4f3ef624b9b7cf20435ce035625571649539af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Kleinekath=C3=B6fer?= Date: Sun, 5 Feb 2023 16:33:51 +0100 Subject: [PATCH 3/9] Update action.yml --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 0f04272..b0a3704 100644 --- a/action.yml +++ b/action.yml @@ -41,6 +41,7 @@ runs: env: CONFIG_PATH: ${{ inputs.config_path }} DOIT: ${{ inputs.doit }} + FORCE: ${{ inputs.force }} run: ${{ github.action_path }}/scripts/run.sh shell: bash working-directory: ${{ github.workspace }} From 83392c17963900f66ee81669c742f6db40a88e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Kleinekath=C3=B6fer?= Date: Sun, 5 Feb 2023 16:37:50 +0100 Subject: [PATCH 4/9] Update action.yml --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index b0a3704..03dcbbd 100644 --- a/action.yml +++ b/action.yml @@ -3,10 +3,6 @@ name: 'octodns-sync' description: 'Run octodns/octodns to deploy your DNS config to any cloud.' inputs: - force: - description: 'Run octodns in force mode?' - required: true - default: 'No' add_pr_comment: description: 'Add plan as a comment, when triggered by a pull request?' required: true @@ -21,6 +17,10 @@ inputs: not do it.' required: false default: '' + force: + description: 'Run octodns in force mode?' + required: false + default: 'No' pr_comment_token: description: 'Provide a token to use, if you set add_pr_comment to Yes.' required: true From 9fde8d4cc2274511ffdae08a3bfb2aa9b08ea852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Kleinekath=C3=B6fer?= Date: Sun, 5 Feb 2023 16:39:38 +0100 Subject: [PATCH 5/9] Update run.sh --- scripts/run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/run.sh b/scripts/run.sh index 9045a19..7f886b4 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -23,7 +23,9 @@ echo "INFO: _config_path: ${_config_path}" if [ ! "${_doit}" = "--doit" ]; then _doit= fi -if [ ! "${_force}" = "Yes" ]; then +if [ "${_force}" = "Yes" ]; then + _force="--force" +else _force= fi From 7ce41b821955650440b689e968b8a68435a9c3f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Kleinekath=C3=B6fer?= Date: Sun, 5 Feb 2023 16:40:40 +0100 Subject: [PATCH 6/9] Update run.sh --- scripts/run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/run.sh b/scripts/run.sh index 7f886b4..2dfa177 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -23,7 +23,9 @@ echo "INFO: _config_path: ${_config_path}" if [ ! "${_doit}" = "--doit" ]; then _doit= fi + if [ "${_force}" = "Yes" ]; then + echo "INFO: Running octodns-sync in force-mode" _force="--force" else _force= From 432378938f31cb3705a12cddc60dffaab044189d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Kleinekath=C3=B6fer?= Date: Sun, 5 Feb 2023 16:46:51 +0100 Subject: [PATCH 7/9] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 79fffbd..a025388 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,12 @@ Really do it? Set "--doit" to do it; Any other string to not do it. Default `""` (empty string). +### `force` + +Run octodns-sync in force mode? Set "Yes" to do it. + +Default `"No"`. + ### `add_pr_comment` Add plan as a comment, when triggered by a pull request? Set "Yes" to do it. From cb0eccbad925f76d5d5a32f9e9a199d788d468b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Kleinekath=C3=B6fer?= Date: Sun, 5 Feb 2023 16:46:59 +0100 Subject: [PATCH 8/9] Update action.yml --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 03dcbbd..54ef484 100644 --- a/action.yml +++ b/action.yml @@ -18,7 +18,7 @@ inputs: required: false default: '' force: - description: 'Run octodns in force mode?' + description: 'Run octodns-sync in force mode?' required: false default: 'No' pr_comment_token: From 38108a17942cb50e5f61030b3eb3b12cd421ca00 Mon Sep 17 00:00:00 2001 From: "Roger D. Winans" Date: Sun, 12 Feb 2023 20:05:57 -0500 Subject: [PATCH 9/9] Update CHANGELOG.md --- docs/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a0c23c0..47a1e2e 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - ([#93](https://github.com/solvaholic/octodns-sync/pull/93)) Add output **log** to include output from `octodns-sync` command. +- ([#98](https://github.com/solvaholic/octodns-sync/pull/98)) Integrate octodns' force flag. ### Removed