Skip to content

Commit

Permalink
Merge pull request #214 from modeseven-lfit/file-grep-action
Browse files Browse the repository at this point in the history
Fix: Add multi-line string handling to action output
  • Loading branch information
ModeSevenIndustrialSolutions authored Jan 30, 2025
2 parents 36ff4d1 + 9ce0f91 commit 0b3caf2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/actions/file-grep-regex-action/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,15 @@ runs:
exit 1
fi
else
# Make string available as action output
echo "extracted_string=$STRING" >> "$GITHUB_OUTPUT"
echo "Extracted string: $STRING ✅"
# Make multi-line string available as action output
{ echo 'extracted_string<<EOF'
echo "$STRING"
echo EOF
} >> "$GITHUB_ENV"
{ echo 'extracted_string<<EOF'
echo "$STRING"
echo EOF
} >> "$GITHUB_OUTPUT"
echo "Extracted string ✅"
echo "$STRING"
fi

0 comments on commit 0b3caf2

Please sign in to comment.