Skip to content

Commit 01207e2

Browse files
committed
Tweak invalid action workflow
1 parent 4ad3879 commit 01207e2

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

.github/workflows/test-replace-string.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Check replaced string
3131
shell: bash
3232
run: |
33-
if [[ '${{ steps.replace-string.output.replaced-string }}' != 'Apple Apricot' ]]; then
33+
if [[ '${{ steps.replace-string.outputs.replaced-string }}' != 'Apple Apricot' ]]; then
3434
echo '!!! Action replace-string failed to make simple string replacement'
3535
exit 1
3636
fi
@@ -52,7 +52,7 @@ jobs:
5252
- name: Check replaced string
5353
shell: bash
5454
run: |
55-
if [[ '${{ steps.replace-string.output.replaced-string }}' != 'Apricot Redberry' ]]; then
55+
if [[ '${{ steps.replace-string.outputs.replaced-string }}' != 'Apricot Redberry' ]]; then
5656
echo '!!! Action replace-string failed to replace string from a file'
5757
exit 1
5858
fi

replace-string/index.js

-6
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,9 @@ try {
3333
strToReplace = inString;
3434
}
3535

36-
console.log(strToReplace);
37-
console.log(inReplaceRegex);
38-
console.log(inFlags);
39-
console.log(inReplaceWith);
40-
4136
const regex = new RegExp(inReplaceRegex, inFlags);
4237
strReplaced = strToReplace.replace(regex, inReplaceWith);
4338

44-
console.log(strReplaced);
4539

4640
// Output
4741
if (inWriteToFile != '') {

0 commit comments

Comments
 (0)