Skip to content

Commit

Permalink
Tweak invalid action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mikogs committed Oct 24, 2023
1 parent 4ad3879 commit 01207e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-replace-string.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 0 additions & 6 deletions replace-string/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 != '') {
Expand Down

0 comments on commit 01207e2

Please sign in to comment.