From 01207e28bdbfbafef78d37e204d968f4687a28a4 Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Tue, 24 Oct 2023 22:47:06 +0200 Subject: [PATCH] Tweak invalid action workflow --- .github/workflows/test-replace-string.yml | 4 ++-- replace-string/index.js | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-replace-string.yml b/.github/workflows/test-replace-string.yml index 8aa93ef..2b3ad60 100644 --- a/.github/workflows/test-replace-string.yml +++ b/.github/workflows/test-replace-string.yml @@ -30,7 +30,7 @@ jobs: - name: Check replaced string shell: bash run: | - if [[ '${{ steps.replace-string.output.replaced-string }}' != 'Apple Apricot' ]]; then + if [[ '${{ steps.replace-string.outputs.replaced-string }}' != 'Apple Apricot' ]]; then echo '!!! Action replace-string failed to make simple string replacement' exit 1 fi @@ -52,7 +52,7 @@ jobs: - name: Check replaced string shell: bash run: | - if [[ '${{ steps.replace-string.output.replaced-string }}' != 'Apricot Redberry' ]]; then + if [[ '${{ steps.replace-string.outputs.replaced-string }}' != 'Apricot Redberry' ]]; then echo '!!! Action replace-string failed to replace string from a file' exit 1 fi diff --git a/replace-string/index.js b/replace-string/index.js index 9f71d2f..1add520 100644 --- a/replace-string/index.js +++ b/replace-string/index.js @@ -33,15 +33,9 @@ try { strToReplace = inString; } - console.log(strToReplace); - console.log(inReplaceRegex); - console.log(inFlags); - console.log(inReplaceWith); - const regex = new RegExp(inReplaceRegex, inFlags); strReplaced = strToReplace.replace(regex, inReplaceWith); - console.log(strReplaced); // Output if (inWriteToFile != '') {